mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 278860 - Show the right error message when the profile is missing; r=bsmedberg a=mfinkle
This commit is contained in:
parent
b2ac75b86d
commit
fec212b73e
@ -121,6 +121,14 @@ function acceptDialog()
|
||||
profileLock = selectedProfile.profile.lock({ value: null });
|
||||
}
|
||||
catch (e) {
|
||||
if (!selectedProfile.profile.localDir.exists()) {
|
||||
var missingTitle = gProfileManagerBundle.getString("profileMissingTitle");
|
||||
var missing =
|
||||
gProfileManagerBundle.getFormattedString("profileMissing", [appName]);
|
||||
gPromptService.alert(window, missingTitle, missing);
|
||||
return false;
|
||||
}
|
||||
|
||||
var lockedTitle = gProfileManagerBundle.getString("profileLockedTitle");
|
||||
var locked =
|
||||
gProfileManagerBundle.getFormattedString("profileLocked2", [appName, selectedProfile.profile.name, appName]);
|
||||
|
@ -2197,6 +2197,12 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n
|
||||
rv = profile->GetLocalDir(getter_AddRefs(profileLocalDir));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool exists;
|
||||
profileLocalDir->Exists(&exists);
|
||||
if (!exists) {
|
||||
return ProfileMissingDialog(aNative);
|
||||
}
|
||||
|
||||
return ProfileLockedDialog(profileDir, profileLocalDir, unlocker,
|
||||
aNative, aResult);
|
||||
}
|
||||
@ -2271,6 +2277,12 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n
|
||||
rv = profile->GetRootDir(getter_AddRefs(profileLocalDir));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool exists;
|
||||
profileLocalDir->Exists(&exists);
|
||||
if (!exists) {
|
||||
return ProfileMissingDialog(aNative);
|
||||
}
|
||||
|
||||
return ProfileLockedDialog(profileDir, profileLocalDir, unlocker,
|
||||
aNative, aResult);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user