GNOME Bugzilla – Bug 346354
Strange behaviour when saving to nonexistent directory
Last modified: 2020-11-24 09:58:03 UTC
When you start gedit from commandline giving a path to a nonexistant directory/file and save it the behaviour of gedit is strange. 1. It shows the error message "Could not save the file /nonexistant/path/file. Unexpected error: File not found." However, the file could not be saved because of the nonexistent directory. 2. This behaviour is inconsistent to starting gedit from commandline with a new file in an existing directory. Gedit creates the new file, when you save it. - Gedit should create the new directory, when you save the file. Maybe asking for confirmation first. - If you don't want gedit to create a new directory, could you please change the error message to something more clear? On a sidenote, vi shows the same strange behaviour. Other information:
vim says: “cannot open file for saving” and nano: “Error writing foo/bar: No such file or directory” Is there any editor actually behaving the way you describe?
Despite what vim does, I think that creating the directory is the right behavior from the user point of view. It's just a bug that slipped through the cracks. At most we could add a "the directory foo doesn't exist. Create the dir and save the file?" warning.
*** Bug 349147 has been marked as a duplicate of this bug. ***
confirming, also see the comments in bug 349147
Still a problem with gedit 3.14.
Mass-closing of all gedit bugzilla tickets. Special "code" to find again all those gedit bugzilla tickets that were open before the mass-closing: 2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3 By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements. We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.