Kaydet (Commit) 6215da2d authored tarafından Christian Lohmaier's avatar Christian Lohmaier Kaydeden (comit) Michael Stahl

honor USE_INTERNAL_RIGHTS from scp2

Archive::Zip doensn't restore file permissions when unpacking, so
stat'ing the extracted copy is useless.

Change-Id: Ifdc586fbe76bc55af35f10c6ad9468ae69947f13
Reviewed-on: https://gerrit.libreoffice.org/1167Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 396f374e
...@@ -364,8 +364,7 @@ sub resolving_archive_flag ...@@ -364,8 +364,7 @@ sub resolving_archive_flag
if (( $use_internal_rights ) && ( ! $installer::globals::iswin )) if (( $use_internal_rights ) && ( ! $installer::globals::iswin ))
{ {
my $value = sprintf("%o", (stat($newfile{'sourcepath'}))[2]); $newfile{'UnixRights'} = sprintf("%o", ($zip->memberNamed($zipname)->unixFileAttributes() & 07777);
$newfile{'UnixRights'} = substr($value, 3);
$infoline = "Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n"; $infoline = "Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
push( @installer::globals::logfileinfo, $infoline); push( @installer::globals::logfileinfo, $infoline);
} }
......
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