1
0
MozillaThunderbird/home-download.patch

92 lines
3.0 KiB
Diff
Raw Normal View History

From: Wolfgang Rosenauer <stark@suse.de>
Subject: Firefox won't allow me to save downloaded files in my home directory
References:
https://bugzilla.novell.com/show_bug.cgi?id=144894
https://bugzilla.mozilla.org/show_bug.cgi?id=300856
Index: mail/components/preferences/downloads.js
===================================================================
RCS file: /cvsroot/mozilla/mail/components/preferences/downloads.js,v
retrieving revision 1.5
diff -u -p -6 -r1.5 downloads.js
--- mail/components/preferences/downloads.js 13 Sep 2005 18:39:27 -0000 1.5
+++ mail/components/preferences/downloads.js 1 Feb 2006 15:58:51 -0000
@@ -91,22 +91,27 @@ var gDownloadsPane = {
var customDirPref = document.getElementById("browser.download.dir");
return customDirPref.value;
},
_getSpecialFolderKey: function (aFolderType)
{
+ if (aFolderType == "Desktop")
+ return "Desk";
+
+ if (aFolderType != "Downloads")
+ throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+
#ifdef XP_WIN
- return aFolderType == "Desktop" ? "DeskP" : "Pers";
-#endif
+ return "Pers";
+#else
#ifdef XP_MACOSX
- return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs";
+ return "UsrDocs";
+#else
+ return "Home";
#endif
-#ifdef XP_OS2
- return aFolderType == "Desktop" ? "Desk" : "Home";
#endif
- return "Home";
},
_getDownloadsFolder: function (aFolder)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
Index: toolkit/mozapps/downloads/content/downloads.js
===================================================================
RCS file: /cvsroot/mozilla/toolkit/mozapps/downloads/content/downloads.js,v
retrieving revision 1.53
diff -u -p -6 -r1.53 downloads.js
--- toolkit/mozapps/downloads/content/downloads.js 9 Jan 2006 20:36:45 -0000 1.53
+++ toolkit/mozapps/downloads/content/downloads.js 1 Feb 2006 15:59:07 -0000
@@ -775,25 +775,27 @@ function initAutoDownloadDisplay()
autodownloadInfo.hidden = false;
var autodownloadSpring = document.getElementById("autodownloadSpring");
autodownloadSpring.hidden = true;
function getSpecialFolderKey(aFolderType)
{
+ if (aFolderType == "Desktop")
+ return "Desk";
+
+ if (aFolderType != "Downloads")
+ throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+
#ifdef XP_WIN
- return aFolderType == "Desktop" ? "DeskP" : "Pers";
-#endif
+ return "Pers";
+#else
#ifdef XP_MACOSX
- return aFolderType == "Desktop" ? "UsrDsk" : "UsrDocs";
-#endif
-#ifdef XP_OS2
- return aFolderType == "Desktop" ? "Desk" : "Home";
+ return "UsrDocs";
+#else
+ return "Home";
#endif
-#ifdef XP_BEOS
- return aFolderType == "Desktop" ? "Desk" : "Home";
#endif
- return "Home";
}
function getDownloadsFolder(aFolder)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);