Kaydet (Commit) 97aa4a60 authored tarafından David Tardon's avatar David Tardon

filelists should honor USE_INTERNAL_RIGHTS flag

Change-Id: I3edbae98c9bb51899e5592fae1cfe9f3632ad535
üst c559b13b
......@@ -8,6 +8,8 @@
package installer::filelists;
use File::stat;
use installer::files;
use installer::globals;
use installer::logger;
......@@ -21,12 +23,17 @@ sub resolve_filelist_flag
foreach my $file (@{$files})
{
my $is_filelist = 0;
my $use_internal_rights = 0;
if ($file->{'Styles'})
{
if ($file->{'Styles'} =~ /\bFILELIST\b/)
{
$is_filelist = 1;
}
if ($file->{'Styles'} =~ /\bUSE_INTERNAL_RIGHTS\b/ && !$installer::globals::iswin)
{
$use_internal_rights = 1;
}
}
if ($is_filelist)
......@@ -59,6 +66,12 @@ sub resolve_filelist_flag
$newfile{'filelistname'} = $file->{'Name'};
$newfile{'filelistpath'} = $file->{'sourcepath'};
if ($use_internal_rights)
{
my $st = stat($path);
$newfile{'UnixRights'} = sprintf("%o", $st->mode & 0777);
}
push @newfiles, \%newfile;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment