diff options
author | Jim Meyering <jim@meyering.net> | 1998-09-20 13:44:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-09-20 13:44:12 +0000 |
commit | 2b8279f893603de585d86c172c9737194ff18ead (patch) | |
tree | 4df4f4855d6716ae2b0296f560ea1725ca0c369c /src/install.c | |
parent | ef679d9871e1c8ba7039e02875298a1bb85c183e (diff) | |
download | coreutils-2b8279f893603de585d86c172c9737194ff18ead.tar.xz |
(install_file_to_path) [-D]: Create any leading
directories with permissions of 0755.
Diffstat (limited to 'src/install.c')
-rw-r--r-- | src/install.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/install.c b/src/install.c index fa579315a..822596d13 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) |