Try to create the autosave directory if that does not exists

Bug #490338 reported by Aurium on 2009-11-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
John Smith

Bug Description

I try to use the a sub-directory of my home as the Inkscape autosave location to don't mess with my files.

I only define the path "/home/aurium/ink-bak" and wait to see it works, but it can't create the directory automatically, and trow the warning to the terminal: "Cannot open autosave directory"

The automatic creation of the autosave directory is important to help the user in some ways:
  - fast deletion of autosaves deleting the dir without needing to re-create the dir.
  - protect misunderstanding when the user create a dir with a name and configure other name.
  - help user desktop migration, when only important things are bakuped, like specific configuration.
  - help the Inkscape configuration sharing.

When Inkscape really can't to create the dir, it must say "Cannot create the directory <dir path> for autosave"
(the <dir path> is really important to find personal errors)

su_v (suv-lp) on 2009-11-30
tags: added: autosave ui
jazzynico (jazzynico) on 2009-11-30
Changed in inkscape:
importance: Undecided → Wishlist
Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
status: New → Confirmed
su_v (suv-lp) wrote :

related reports:
Bug #570695 “show default|fallback autosave path”
Bug #635992 “autosave on by default”

John Smith (john-smithi) wrote :

Patch that attempts to create the autosave directory, if it doesn't exist.
Tested on Ubuntu 12.04 and Windows 7.

Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → John Smith (john-smithi)
status: Confirmed → In Progress
su_v (suv-lp) wrote :

> Patch that attempts to create the autosave directory, if it doesn't exist.

Is this correct?
- does not accept '~' or e.g. '$HOME'
- a relative path is resolved relative to '$HOME' (or is it to the directory Inkscape was launched from?)

Maybe the tooltip could contain minimal information about how what is accepted as input (Linux/OS X, Windows)?

John Smith (john-smithi) wrote :

Relative paths dont seem to work well - a single name "tmp1" works, but "tmp2/tmp3" doesnt seem to work on Ubuntu.
Relative paths are saved relative to the "current directory" [1] - usually the directory the application was launched from.
Variables such as '~', '$HOME' seem to be not "interpreted" to their absolute path equivalents and are used as-is in the function g_mkdir [2] (A wrapper for the POSIX mkdir() function)

How about the tooltip recommend saving absolute paths ?

[1] http://www.gtk.org/api/2.6/glib/glib-Miscellaneous-Utility-Functions.html#g-get-current-dir
[2] http://www.gtk.org/api/2.6/glib/glib-File-Utilities.html#g-mkdir

John Smith (john-smithi) wrote :

Committed as r11759.

Changed in inkscape:
status: In Progress → Fix Committed
Kris (kris-degussem) on 2012-10-08
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers