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/1167
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
Christian Lohmaier
2012-11-25 17:49:01 +01:00
committed by Michael Stahl
parent 396f374e5c
commit 6215da2dfb

View File

@@ -364,8 +364,7 @@ sub resolving_archive_flag
if (( $use_internal_rights ) && ( ! $installer::globals::iswin ))
{
my $value = sprintf("%o", (stat($newfile{'sourcepath'}))[2]);
$newfile{'UnixRights'} = substr($value, 3);
$newfile{'UnixRights'} = sprintf("%o", ($zip->memberNamed($zipname)->unixFileAttributes() & 07777);
$infoline = "Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
push( @installer::globals::logfileinfo, $infoline);
}