From: Jim Meyering Date: Sun, 20 Sep 1998 13:44:12 +0000 (+0000) Subject: (install_file_to_path) [-D]: Create any leading X-Git-Tag: FILEUTILS-3_16z~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b8279f893603de585d86c172c9737194ff18ead;p=thirdparty%2Fcoreutils.git (install_file_to_path) [-D]: Create any leading directories with permissions of 0755. --- diff --git a/src/install.c b/src/install.c index fa579315ae..822596d130 100644 --- a/src/install.c +++ b/src/install.c @@ -416,14 +416,12 @@ install_file_to_path (const char *from, const char *to, if (!STREQ (dest_dir, ".") && !isdir (dest_dir)) { - /* FIXME: Note that it's a little kludgey (even dangerous) that we - derive the permissions for parent directories from the permissions - specfied for the file, but since this option is intended mainly to - help installers when the distribution doesn't provide proper install - rules, it's not so bad. Maybe use something like this instead: - int parent_dir_mode = (mode | (S_IRUGO | S_IXUGO)) & (~SPECIAL_BITS); - */ - fail = make_path (dest_dir, mode, mode, owner_id, group_id, 0, + /* Someone will probably ask for a new option or three to specify + owner, group, and permissions for parent directories. Remember + that this option is intended mainly to help installers when the + distribution doesn't provide proper install rules. */ +#define DIR_MODE 0755 + fail = make_path (dest_dir, DIR_MODE, DIR_MODE, owner_id, group_id, 0, (x->verbose ? _("creating directory `%s'") : NULL)); if (fail == 0)