summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-03-06 20:58:08 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-03-06 20:58:08 +0000
commit8f714033acc23dfbd252617806287fb1b7be7ae5 (patch)
tree3e31f64d9bf9ae306d5f33e5504e50adb5b989fc /src
parent1a510e15980ae96e3c495c8b273282f099fa46f5 (diff)
downloadweechat-8f714033acc23dfbd252617806287fb1b7be7ae5.zip
Fixed chmod on home (now chmod is not executed when a directory is user's home)
Diffstat (limited to 'src')
-rw-r--r--src/common/weechat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/weechat.c b/src/common/weechat.c
index d94878514..7acf4d5d3 100644
--- a/src/common/weechat.c
+++ b/src/common/weechat.c
@@ -750,7 +750,10 @@ weechat_create_config_dirs ()
dir1 = weechat_strreplace (cfg_log_path, "~", getenv ("HOME"));
dir2 = weechat_strreplace (dir1, "%h", weechat_home);
if (weechat_create_dir (dir2))
- chmod (dir2, 0700);
+ {
+ if (strcmp (dir2, getenv ("HOME")) != 0)
+ chmod (dir2, 0700);
+ }
else
fprintf (stderr, _("%s unable to create \"%s\" directory\n"),
WEECHAT_WARNING, dir2);
@@ -763,7 +766,10 @@ weechat_create_config_dirs ()
dir1 = weechat_strreplace (cfg_dcc_download_path, "~", getenv ("HOME"));
dir2 = weechat_strreplace (dir1, "%h", weechat_home);
if (weechat_create_dir (dir2))
- chmod (dir2, 0700);
+ {
+ if (strcmp (dir2, getenv ("HOME")) != 0)
+ chmod (dir2, 0700);
+ }
else
fprintf (stderr, _("%s unable to create \"%s\" directory\n"),
WEECHAT_WARNING, dir2);