raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6b493430df51eb7b89910c86bec6497a2c6eea53

commit 6b493430df51eb7b89910c86bec6497a2c6eea53
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Apr 12 22:18:48 2015 +0900

    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.
---
 src/bin/efreet/efreet_desktop_cache_create.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/bin/efreet/efreet_desktop_cache_create.c 
b/src/bin/efreet/efreet_desktop_cache_create.c
index 4fa3ef4..498daa4 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());

-- 


Reply via email to