зеркало из https://github.com/mozilla/pjs.git
Bug 568373 - Use "Desktop" for Windows, because apparently we don't have a useful notion of "Home" on Windows
This commit is contained in:
Родитель
6d1cdd8d9b
Коммит
b27cf250ee
|
@ -421,7 +421,12 @@ nsFileControlFrame::MouseListener::MouseClick(nsIDOMEvent* aMouseEvent)
|
|||
if (!localFile) {
|
||||
// Default to "home" directory for each platform
|
||||
nsCOMPtr<nsIFile> homeDir;
|
||||
NS_GetSpecialDirectory(NS_OS_HOME_DIR, getter_AddRefs(homeDir));
|
||||
#ifdef XP_WIN
|
||||
const char *dir = NS_WIN_DESKTOP_DIRECTORY; // Use Desktop on Windows
|
||||
#else
|
||||
const char *dir = NS_OS_HOME_DIR;
|
||||
#endif
|
||||
NS_GetSpecialDirectory(dir, getter_AddRefs(homeDir));
|
||||
localFile = do_QueryInterface(homeDir);
|
||||
}
|
||||
filePicker->SetDisplayDirectory(localFile);
|
||||
|
|
|
@ -34,7 +34,11 @@ if ("@mozilla.org/privatebrowsing;1" in Cc) {
|
|||
}
|
||||
|
||||
var tmpDir = dirSvc.get("TmpD", Ci.nsILocalFile);
|
||||
var homeDir = dirSvc.get("Home", Ci.nsILocalFile);
|
||||
var homeDirName = "Home";
|
||||
const isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
|
||||
if (isWindows)
|
||||
homeDirName = "DeskP";
|
||||
var homeDir = dirSvc.get(, Ci.nsILocalFile);
|
||||
prefSvc.setBoolPref("browser.privatebrowsing.keep_current_session", true);
|
||||
|
||||
function newDir() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче