GNOME Bugzilla – Bug 308658
use g_mkdir_with_parents() to create tmp folder
Last modified: 2008-01-15 14:04:01 UTC
my user profile information is stored on a network drive and the gimp was using that very limited and relatively slow space for tmp and swap space. I set it up to use a local folder /tmp/horkana/ but that caused serious problems as that folder does not always exist if I log in to a different computer. (I'd rather not use /tmp directly and risk leaving scraps of information about what I have been doing visible to other users but as a workaround I probably will do it) I was hoping the code could be change to create the necessary folders if they do not already exist but I haven't given this a whole lot of thought and I may trying to solve the wrong problem.
How about putting some code into your startup shell script that executes something like ln -s /whatever ~/.gimpswap where a different /whatever is chosen for each value of HOSTNAME?
There are various work arounds but I cannot help thinking it is incorrect to assume folders are where they should be without checking first and things could fail much more gracefully or even not fail at all. This feels vaguely familiar and I think similar assumptions may exist elsewhere but I'll have to try gradually deleting the contents of my ~/.gimp folder and see what happens.
Are you sure that this problem shows up with 2.3.0? Anyway, 2.3.0 is not the latest released development version and it appears somewhat unfair to annoy us with bug reports on old development releases.
Looks like a duplicate of bug #172682 to me.
Looks very similar to me too. I'll have to try a current build and see if I recreate the issue.
Currently we only create the configured folder but that is going to fail if the parent folder doesn't exist. Is that your problem perhaps? I am not really willing to add code that also creates the parent folders. At some point we will depend on glib 2.8 and can then use g_mkdir_with_parents().
as you say i was effectively trying to create /tmp/horkana/swap/ and /tmp was the only part I could assume would always exist I'm not in any hurry for a fix and I'm happy enough to wait until glib 2.8 comes along. I've gotten by this long using my networked home folder for swap space without noticing any major problems so I can keep doing that.
Let's confirm this.
This is for GIMP 2.6 then (or as soon as we depend on glib 2.8). Perhaps we end up doing that for GIMP 2.4 even.
We depend on glib 2.8 now, so this change can be done.
2005-10-17 Sven Neumann <sven@gimp.org> * app/base/base.c (base_init) * app/base/tile-swap.c (tile_swap_init): create temp and swap directories using g_mkdir_with_parents() (bug #308658).