Bug 568373 - Use "Desktop" for Windows, because apparently we don't have a useful notion of "Home" on Windows
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user