[Libreoffice-commits] .: solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 27 09:36:53 PST 2012


 solenv/bin/modules/installer/archivefiles.pm |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 6215da2dfb96ed6b36ef42bc1afa1ab43c803f3d
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sun Nov 25 17:49:01 2012 +0100

    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 at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm
index 6862c6f..396da4f 100644
--- a/solenv/bin/modules/installer/archivefiles.pm
+++ b/solenv/bin/modules/installer/archivefiles.pm
@@ -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);
                         }


More information about the Libreoffice-commits mailing list