aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-12 22:18:48 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-13 09:15:43 +0900
commit6b493430df51eb7b89910c86bec6497a2c6eea53 (patch)
treea04b29e23e0494b66d4c1bb3cddcd2ae63854c8a /src/bin/efreet
parentefreetd - startup slowness fix for recursing directories (diff)
downloadefl-6b493430df51eb7b89910c86bec6497a2c6eea53.tar.gz
efreetd - cache generators - dont unlink then rename - fix
if you unlink then rename, there is a gap between the unlink and rename - no file is there. the point of the rename is to be atomic. either old file OR new file. nothing in between. this fixes that race.
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index 4fa3ef4397..498daa41e5 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -493,14 +493,6 @@ main(int argc, char **argv)
/* unlink old cache files */
if (changed)
{
- if (unlink(efreet_desktop_cache_file()) < 0)
- {
- if (errno != ENOENT) goto error;
- }
- if (unlink(efreet_desktop_util_cache_file()) < 0)
- {
- if (errno != ENOENT) goto error;
- }
/* rename tmp files to real files */
if (rename(util_file, efreet_desktop_util_cache_file()) < 0) goto error;
efreet_setowner(efreet_desktop_util_cache_file());