1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

Fixed chmod on home (now chmod is not executed when a directory is user's home)

This commit is contained in:
Sebastien Helleu
2006-03-06 20:58:08 +00:00
parent 1a510e1598
commit 8f714033ac
2 changed files with 16 additions and 4 deletions
+8 -2
View File
@@ -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);
+8 -2
View File
@@ -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);