summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-08-07 10:52:48 +0200
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-08-07 13:02:53 +0200
commita8d70f803cc4c9c1da3eb9e0bfbdea41229d4398 (patch)
treedf4eb5e5475fed7f05cbfd63db17d1d40e9714bd /src
parent7d1703ea0dd7e5eb2eedb78f1a9f5f008907c41c (diff)
efreet: Check return value of chmod
CID: #1039690
Diffstat (limited to 'src')
-rw-r--r--src/lib/efreet/efreet_base.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index 7a1398283a..7c68751368 100644
--- a/src/lib/efreet/efreet_base.c
+++ b/src/lib/efreet/efreet_base.c
@@ -321,7 +321,14 @@ efreet_dirs_init(void)
321 ERR("$XDG_RUNTIME_DIR did not exist, creating '%s' (breaks spec)", 321 ERR("$XDG_RUNTIME_DIR did not exist, creating '%s' (breaks spec)",
322 xdg_runtime_dir); 322 xdg_runtime_dir);
323 if (ecore_file_mkpath(xdg_runtime_dir)) 323 if (ecore_file_mkpath(xdg_runtime_dir))
324 chmod(xdg_runtime_dir, 0700); 324 {
325 if (chmod(xdg_runtime_dir, 0700) < 0)
326 {
327 CRITICAL("Cannot set XDG_RUNTIME_DIR=%s to mode 0700: %s",
328 xdg_runtime_dir, strerror(errno));
329 eina_stringshare_replace(&xdg_runtime_dir, NULL);
330 }
331 }
325 else 332 else
326 { 333 {
327 CRITICAL("Failed to create XDG_RUNTIME_DIR=%s", xdg_runtime_dir); 334 CRITICAL("Failed to create XDG_RUNTIME_DIR=%s", xdg_runtime_dir);