mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 531532 - Crash for profiles with a non-existent non-relative profile location. r=bsmedberg a=beltzner
This commit is contained in:
parent
e9f3f00f0e
commit
6c90a80ad0
@ -2012,6 +2012,14 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
|
||||
|
||||
nsCOMPtr<nsIProfileUnlocker> unlocker;
|
||||
|
||||
// Check if the profile path exists and it's a directory.
|
||||
PRBool exists;
|
||||
lf->Exists(&exists);
|
||||
if (!exists) {
|
||||
rv = lf->Create(nsIFile::DIRECTORY_TYPE, 0644);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
// If a profile path is specified directory on the command line, then
|
||||
// assume that the temp directory is the same as the given directory.
|
||||
rv = NS_LockProfilePath(lf, lf, getter_AddRefs(unlocker), aResult);
|
||||
|
Loading…
Reference in New Issue
Block a user