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 308658 - use g_mkdir_with_parents() to create tmp folder
use g_mkdir_with_parents() to create tmp folder
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.3.x
Other All
: Normal trivial
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-06-22 15:40 UTC by Alan Horkan
Modified: 2008-01-15 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alan Horkan 2005-06-22 15:40:50 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.
Comment 1 weskaggs 2005-06-22 16:12:22 UTC
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?
Comment 2 Alan Horkan 2005-06-22 16:19:32 UTC
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.  
Comment 3 Sven Neumann 2005-06-22 21:21:37 UTC
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.
Comment 4 Sven Neumann 2005-06-22 22:46:55 UTC
Looks like a duplicate of bug #172682 to me.
Comment 5 Alan Horkan 2005-06-22 23:52:53 UTC
Looks very similar to me too.   
I'll have to try a current build and see if I recreate the issue.  
Comment 6 Sven Neumann 2005-06-27 12:22:01 UTC
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().
Comment 7 Alan Horkan 2005-06-27 19:37:08 UTC
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.  
Comment 8 Michael Schumacher 2005-07-06 21:11:04 UTC
Let's confirm this.
Comment 9 Sven Neumann 2005-07-13 15:23:27 UTC
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.
Comment 10 Michael Schumacher 2005-10-17 16:26:46 UTC
We depend on glib 2.8 now, so this change can be done.
Comment 11 Sven Neumann 2005-10-17 17:28:03 UTC
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).