Bug 926736 - Update devtools caller for new return type of get directory methods in DownloadIntegration.jsm r=jwalker
authorRaymond Lee <raymond@raysquare.com>
Mon, 21 Oct 2013 13:04:30 +0800
changeset 166845 eafedd45d99ed98859a5f148d9c4deb4adc8c5c7
parent 166844 2b60e922a16e9b09d5006d408380cac466df7662
child 166846 776a19e7928cc75ebd1d2b36b62e7d36a4733902
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs926736
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 926736 - Update devtools caller for new return type of get directory methods in DownloadIntegration.jsm r=jwalker
browser/devtools/commandline/BuiltinCommands.jsm
--- a/browser/devtools/commandline/BuiltinCommands.jsm
+++ b/browser/devtools/commandline/BuiltinCommands.jsm
@@ -1831,19 +1831,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                       [dateString, timeString]) + ".png";
         }
         // Check there is a .png extension to filename
         else if (!filename.match(/.png$/i)) {
           filename += ".png";
         }
         // If the filename is relative, tack it onto the download directory
         if (!filename.match(/[\\\/]/)) {
-          let tempfile = yield Downloads.getPreferredDownloadsDirectory();
-          tempfile.append(filename);
-          filename = tempfile.path;
+          let preferredDir = yield Downloads.getPreferredDownloadsDirectory();
+          filename = OS.Path.join(preferredDir, filename);
         }
 
         try {
           file.initWithPath(filename);
         } catch (ex) {
           div.textContent = gcli.lookup("screenshotErrorSavingToFile") + " " + filename;
           throw new Task.Result(div);
         }