fix: create the file passed on the command line when it is missing

A path that did not exist was silently ignored: plotzilla
new-script.fountain opened an untitled document instead of a new
script saved to that file on the first save.
This commit is contained in:
Kharec committed 2026-10-15 17:57:24 +02:00
1 parent b0bcb812b1
commit 6622203506
3 files changed
+9 -4

No files matched your search

+1 -3
View File
@@ -29,9 +29,7 @@ func main() {
app := NewApp()
for _, arg := range os.Args[1:] {
if !strings.HasPrefix(arg, "-") {
if _, err := os.Stat(arg); err == nil {
app.initialPath = arg
}
app.initialPath = arg // may not exist yet: then it is a new script
break
}
}