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 100611 - ensure_directory fails with "File Exists"
ensure_directory fails with "File Exists"
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.13.3 betas
Other Linux
: Normal normal
: 0.13.3
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2002-12-07 17:35 UTC by Charles Kerr
Modified: 2006-06-18 05:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Kerr 2002-12-07 17:35:18 UTC
When creating a new directory for a save tasks,
pan/base/util-file's directory function will
incorrectly return a "Couldn't create directory foo: file exists"

The task retries and so it works, but it's still annoying for the
error icon to pop up in the lower right.

** (pan:1149): WARNING **: Couldn't create directory "/var/tmp/pix": File
exists

** (pan:1149): WARNING **: Decode can't access path "/var/tmp/pix/Petunia"

** (pan:1149): WARNING **: Couldn't create directory "/var/tmp/pix/Darla":
File exists

** (pan:1149): WARNING **: Decode can't access path "/var/tmp/pix/Darla"

** (pan:1150): WARNING **: Couldn't create directory "/var/tmp/pix/Darla":
File exists

** (pan:1150): WARNING **: Decode can't access path "/var/tmp/pix/Darla"

** (pan:1147): WARNING **: Couldn't create directory "/var/tmp/pix/Darla":
File exists

** (pan:1147): WARNING **: Decode can't access path "/var/tmp/pix/Darla"
Comment 1 Charles Kerr 2002-12-07 17:48:41 UTC
Looks like this is being caused by 2..n tasks kicking off at the
same time and reaching pan_file_ensure_path_exists() at the same
time.

I've committed a possible fix by adding a GStaticMutex to 
pan_file_ensure_path_exists().

http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/base&command=DIFF_FRAMESET&file=util-file.c&rev1=1.33&rev2=1.34&root=/cvs/gnome