Skip to content

Instantly share code, notes, and snippets.

@torarnv
Created June 3, 2009 11:13
Show Gist options
  • Save torarnv/122929 to your computer and use it in GitHub Desktop.
Save torarnv/122929 to your computer and use it in GitHub Desktop.
commit 6c1911629315e118d3f04765ac6950c9ab750620
Author: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Date: Wed Jun 3 13:08:18 2009 +0200
2009-06-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Rubber-stamped by Simon Hausmann.
[Qt] Fix Perl warning when calling chdir with an empty/undefined path
This happened when the included makespec was in the same directory as
the parent makespec, so the relative path between the two was empty.
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3faf983..e277992 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Rubber-stamped by Simon Hausmann.
+
+ [Qt] Fix Perl warning when calling chdir with an empty/undefined path
+
+ This happened when the included makespec was in the same directory as
+ the parent makespec, so the relative path between the two was empty.
+
+ * Scripts/webkitdirs.pm:
+
2009-06-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Rubber-stamped by Adam Roben.
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index c221d0e..ca4d15b 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -1022,7 +1022,8 @@ sub retrieveQMakespecVar
# open the included mkspec
my $oldcwd = getcwd();
(my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
- chdir "$volume$directories";
+ my $newcwd = "$volume$directories";
+ chdir $newcwd if $newcwd;
$compiler = retrieveQMakespecVar($1, $varname);
chdir $oldcwd;
} elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment