summaryrefslogtreecommitdiff
path: root/legacy/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-10-18 09:40:00 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-10-18 09:40:00 +0000
commita473306c0e1db357b43566c9ca7bdc178319ba4f (patch)
tree8f8f7935ca329b94b3ad128951226e0891a4b150 /legacy/efreet
parentd1bf182ec83705f1606e9c3a65a731f031929fac (diff)
efreet: move update files
Move update files to separate subdir to reduce inotify triggers SVN revision: 78176
Diffstat (limited to 'legacy/efreet')
-rw-r--r--legacy/efreet/src/bin/efreet_desktop_cache_create.c8
-rw-r--r--legacy/efreet/src/bin/efreet_icon_cache_create.c8
-rw-r--r--legacy/efreet/src/lib/efreet_cache.c10
3 files changed, 24 insertions, 2 deletions
diff --git a/legacy/efreet/src/bin/efreet_desktop_cache_create.c b/legacy/efreet/src/bin/efreet_desktop_cache_create.c
index af60a84fc6..3b77f8282a 100644
--- a/legacy/efreet/src/bin/efreet_desktop_cache_create.c
+++ b/legacy/efreet/src/bin/efreet_desktop_cache_create.c
@@ -272,6 +272,12 @@ main(int argc, char **argv)
272 if (!ecore_file_mkpath(file)) goto efreet_error; 272 if (!ecore_file_mkpath(file)) goto efreet_error;
273 efreet_setowner(file); 273 efreet_setowner(file);
274 } 274 }
275 snprintf(file, sizeof(file), "%s/efreet/update", efreet_cache_home_get());
276 if (!ecore_file_exists(file))
277 {
278 if (!ecore_file_mkpath(file)) goto efreet_error;
279 efreet_setowner(file);
280 }
275 281
276 /* lock process, so that we only run one copy of this program */ 282 /* lock process, so that we only run one copy of this program */
277 lockfd = cache_lock_file(); 283 lockfd = cache_lock_file();
@@ -491,7 +497,7 @@ main(int argc, char **argv)
491 } 497 }
492 498
493 /* touch update file */ 499 /* touch update file */
494 snprintf(file, sizeof(file), "%s/efreet/desktop_data.update", efreet_cache_home_get()); 500 snprintf(file, sizeof(file), "%s/efreet/update/desktop_data.update", efreet_cache_home_get());
495 tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); 501 tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
496 if (tmpfd >= 0) 502 if (tmpfd >= 0)
497 { 503 {
diff --git a/legacy/efreet/src/bin/efreet_icon_cache_create.c b/legacy/efreet/src/bin/efreet_icon_cache_create.c
index 1ed629f53f..e24364b6d5 100644
--- a/legacy/efreet/src/bin/efreet_icon_cache_create.c
+++ b/legacy/efreet/src/bin/efreet_icon_cache_create.c
@@ -852,6 +852,12 @@ main(int argc, char **argv)
852 if (!ecore_file_mkpath(file)) return -1; 852 if (!ecore_file_mkpath(file)) return -1;
853 efreet_setowner(file); 853 efreet_setowner(file);
854 } 854 }
855 snprintf(file, sizeof(file), "%s/efreet/update", efreet_cache_home_get());
856 if (!ecore_file_exists(file))
857 {
858 if (!ecore_file_mkpath(file)) return -1;
859 efreet_setowner(file);
860 }
855 861
856 /* lock process, so that we only run one copy of this program */ 862 /* lock process, so that we only run one copy of this program */
857 lockfd = cache_lock_file(); 863 lockfd = cache_lock_file();
@@ -1112,7 +1118,7 @@ main(int argc, char **argv)
1112 free(theme_version); 1118 free(theme_version);
1113 1119
1114 /* touch update file */ 1120 /* touch update file */
1115 snprintf(file, sizeof(file), "%s/efreet/icon_data.update", efreet_cache_home_get()); 1121 snprintf(file, sizeof(file), "%s/efreet/update/icon_data.update", efreet_cache_home_get());
1116 tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); 1122 tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
1117 if (tmpfd >= 0) 1123 if (tmpfd >= 0)
1118 { 1124 {
diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c
index 437e1840e2..ebf0857c0e 100644
--- a/legacy/efreet/src/lib/efreet_cache.c
+++ b/legacy/efreet/src/lib/efreet_cache.c
@@ -142,6 +142,16 @@ efreet_cache_init(void)
142 } 142 }
143 efreet_setowner(buf); 143 efreet_setowner(buf);
144 } 144 }
145 snprintf(buf, sizeof(buf), "%s/efreet/update", efreet_cache_home_get());
146 if (!ecore_file_exists(buf))
147 {
148 if (!ecore_file_mkpath(buf))
149 {
150 ERR("Failed to create directory '%s'", buf);
151 goto error;
152 }
153 efreet_setowner(buf);
154 }
145 155
146 cache_exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 156 cache_exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
147 cache_exe_cb, NULL); 157 cache_exe_cb, NULL);