Bug 834471 - Part 4: Fix FindBugs warning about unlockProfile() not checking file.delete() return value. r=wesj

This commit is contained in:
Chris Peterson 2013-01-24 14:26:01 -08:00
parent ab9b4ee47f
commit cad9dd0c28

View File

@ -2251,7 +2251,7 @@ public class GeckoAppShell
if (GeckoApp.mAppContext != null)
GeckoApp.mAppContext.notifyCheckUpdateResult(result);
}
public static boolean unlockProfile() {
// Try to kill any zombie Fennec's that might be running
GeckoAppShell.killAnyZombies();
@ -2259,11 +2259,7 @@ public class GeckoAppShell
// Then force unlock this profile
GeckoProfile profile = GeckoApp.mAppContext.getProfile();
File lock = profile.getFile(".parentlock");
if (lock.exists()) {
lock.delete();
return true;
}
return false;
return lock.exists() && lock.delete();
}
public static String getProxyForURI(String spec, String scheme, String host, int port) {