efreet: move update files
Move update files to separate subdir to reduce inotify triggers SVN revision: 78176
This commit is contained in:
parent
d1bf182ec8
commit
a473306c0e
|
@ -272,6 +272,12 @@ main(int argc, char **argv)
|
||||||
if (!ecore_file_mkpath(file)) goto efreet_error;
|
if (!ecore_file_mkpath(file)) goto efreet_error;
|
||||||
efreet_setowner(file);
|
efreet_setowner(file);
|
||||||
}
|
}
|
||||||
|
snprintf(file, sizeof(file), "%s/efreet/update", efreet_cache_home_get());
|
||||||
|
if (!ecore_file_exists(file))
|
||||||
|
{
|
||||||
|
if (!ecore_file_mkpath(file)) goto efreet_error;
|
||||||
|
efreet_setowner(file);
|
||||||
|
}
|
||||||
|
|
||||||
/* lock process, so that we only run one copy of this program */
|
/* lock process, so that we only run one copy of this program */
|
||||||
lockfd = cache_lock_file();
|
lockfd = cache_lock_file();
|
||||||
|
@ -491,7 +497,7 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* touch update file */
|
/* touch update file */
|
||||||
snprintf(file, sizeof(file), "%s/efreet/desktop_data.update", efreet_cache_home_get());
|
snprintf(file, sizeof(file), "%s/efreet/update/desktop_data.update", efreet_cache_home_get());
|
||||||
tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
|
tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
|
||||||
if (tmpfd >= 0)
|
if (tmpfd >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -852,6 +852,12 @@ main(int argc, char **argv)
|
||||||
if (!ecore_file_mkpath(file)) return -1;
|
if (!ecore_file_mkpath(file)) return -1;
|
||||||
efreet_setowner(file);
|
efreet_setowner(file);
|
||||||
}
|
}
|
||||||
|
snprintf(file, sizeof(file), "%s/efreet/update", efreet_cache_home_get());
|
||||||
|
if (!ecore_file_exists(file))
|
||||||
|
{
|
||||||
|
if (!ecore_file_mkpath(file)) return -1;
|
||||||
|
efreet_setowner(file);
|
||||||
|
}
|
||||||
|
|
||||||
/* lock process, so that we only run one copy of this program */
|
/* lock process, so that we only run one copy of this program */
|
||||||
lockfd = cache_lock_file();
|
lockfd = cache_lock_file();
|
||||||
|
@ -1112,7 +1118,7 @@ main(int argc, char **argv)
|
||||||
free(theme_version);
|
free(theme_version);
|
||||||
|
|
||||||
/* touch update file */
|
/* touch update file */
|
||||||
snprintf(file, sizeof(file), "%s/efreet/icon_data.update", efreet_cache_home_get());
|
snprintf(file, sizeof(file), "%s/efreet/update/icon_data.update", efreet_cache_home_get());
|
||||||
tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
|
tmpfd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
|
||||||
if (tmpfd >= 0)
|
if (tmpfd >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,6 +142,16 @@ efreet_cache_init(void)
|
||||||
}
|
}
|
||||||
efreet_setowner(buf);
|
efreet_setowner(buf);
|
||||||
}
|
}
|
||||||
|
snprintf(buf, sizeof(buf), "%s/efreet/update", efreet_cache_home_get());
|
||||||
|
if (!ecore_file_exists(buf))
|
||||||
|
{
|
||||||
|
if (!ecore_file_mkpath(buf))
|
||||||
|
{
|
||||||
|
ERR("Failed to create directory '%s'", buf);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
efreet_setowner(buf);
|
||||||
|
}
|
||||||
|
|
||||||
cache_exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
cache_exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
|
||||||
cache_exe_cb, NULL);
|
cache_exe_cb, NULL);
|
||||||
|
|
Loading…
Reference in New Issue