After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346354 - Strange behaviour when saving to nonexistent directory
Strange behaviour when saving to nonexistent directory
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: file loading and saving
3.14.x
Other All
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 349147 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-01 14:00 UTC by Holger Bauer
Modified: 2020-11-24 09:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Holger Bauer 2006-07-01 14:00:47 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:
Comment 1 Steve Frécinaux 2006-07-01 22:52:46 UTC
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?
Comment 2 Paolo Borelli 2006-07-02 09:07:53 UTC
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.
Comment 3 André Klapper 2006-10-16 14:45:20 UTC
*** Bug 349147 has been marked as a duplicate of this bug. ***
Comment 4 André Klapper 2006-10-16 14:46:19 UTC
confirming, also see the comments in bug 349147
Comment 5 Sébastien Wilmet 2015-06-16 08:59:01 UTC
Still a problem with gedit 3.14.
Comment 6 Sébastien Wilmet 2020-11-24 09:58:03 UTC
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.