Title: [195080] trunk/Tools
Revision
195080
Author
[email protected]
Date
2016-01-14 15:07:44 -0800 (Thu, 14 Jan 2016)

Log Message

prepare-changelog does not read paths containing spaces properly
https://bugs.webkit.org/show_bug.cgi?id=137982

Reviewed by Joseph Pecoraro.

Escape whitespace in filenames before passing the file path to other functions.

* Scripts/prepare-ChangeLog:
(generateFunctionLists): Use the more explicit 3-argument form of 'open'.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (195079 => 195080)


--- trunk/Tools/ChangeLog	2016-01-14 23:00:24 UTC (rev 195079)
+++ trunk/Tools/ChangeLog	2016-01-14 23:07:44 UTC (rev 195080)
@@ -1,3 +1,15 @@
+2016-01-14  Brian Burg  <[email protected]>
+
+        prepare-changelog does not read paths containing spaces properly
+        https://bugs.webkit.org/show_bug.cgi?id=137982
+
+        Reviewed by Joseph Pecoraro.
+
+        Escape whitespace in filenames before passing the file path to other functions.
+
+        * Scripts/prepare-ChangeLog:
+        (generateFunctionLists): Use the more explicit 3-argument form of 'open'.
+
 2016-01-14  Jason Marcell  <[email protected]>
 
         Standardize the usage of "branch" vs. "branchName".

Modified: trunk/Tools/Scripts/prepare-ChangeLog (195079 => 195080)


--- trunk/Tools/Scripts/prepare-ChangeLog	2016-01-14 23:00:24 UTC (rev 195079)
+++ trunk/Tools/Scripts/prepare-ChangeLog	2016-01-14 23:07:44 UTC (rev 195080)
@@ -313,10 +313,14 @@
     print STDERR "  Extracting affected function names from source files.\n";
     my %filesToExamine = map { $_ => 1 } (keys(%line_ranges_before_changed), keys(%line_ranges_after_changed));
     foreach my $file (keys %filesToExamine) {
+        # Escape whitespace in filenames rather than adding quotes, since many functions can open files
+        # and other code doesn't expect to see a trailing " character when sniffing a file extension.
+        chomp $file;
+        $file =~ s/ /\\ /g;
         my %saw_function;
         # Find all the functions in the file.
         if ($line_ranges_after_changed{$file}) {
-            open SOURCE, $file or next;
+            open(SOURCE, "<", $file) or next;
             my @function_ranges = get_function_line_ranges(\*SOURCE, $file);
             close SOURCE;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to