mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Fix native Windows zip build regression from bug 192688 r=bsmedberg
This commit is contained in:
parent
515709a826
commit
52b3387a71
@ -80,9 +80,6 @@ my $jarDir = $chromeDir;
|
||||
if (defined($::opt_j)) {
|
||||
$jarDir = $::opt_j;
|
||||
}
|
||||
if ($jarDir !~ /^\//) {
|
||||
$jarDir = getcwd() . '/' . $jarDir;
|
||||
}
|
||||
|
||||
my $verbose = 0;
|
||||
if (defined($::opt_v)) {
|
||||
@ -218,7 +215,10 @@ sub JarIt
|
||||
{
|
||||
my ($destPath, $jarPath, $jarfile, $args, $overrides) = @_;
|
||||
my $oldDir = cwd();
|
||||
my $jarchive = $jarPath . '/' . $jarfile . '.jar';
|
||||
my @destPath = _moz_splitpath("$destPath/$jarfile");
|
||||
my @jarchive = _moz_splitpath("$jarPath/$jarfile.jar");
|
||||
shift @destPath, shift @jarchive while $destPath[0] eq $jarchive[0];
|
||||
my $jarchive = "../" x @destPath . join("/", @jarchive);
|
||||
chdir("$destPath/$jarfile");
|
||||
|
||||
if ("$fileformat" eq "flat" || "$fileformat" eq "symlink") {
|
||||
@ -288,6 +288,17 @@ sub JarIt
|
||||
#print "cd $oldDir\n";
|
||||
}
|
||||
|
||||
sub _moz_splitpath
|
||||
{
|
||||
my ($path) = @_;
|
||||
my @dirs = split(m:/:, $path);
|
||||
foreach (reverse 0 .. $#dirs) {
|
||||
splice(@dirs, $_, 1) if $dirs[$_] eq ".";
|
||||
splice(@dirs, $_, 2) if $dirs[$_] eq "..";
|
||||
}
|
||||
return @dirs;
|
||||
}
|
||||
|
||||
sub _moz_rel2abs
|
||||
{
|
||||
my ($path, $keep_file) = @_;
|
||||
|
Loading…
Reference in New Issue
Block a user