diff options
author | Michael Wright <michaelwr@google.com> | 2012-08-03 22:08:38 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2012-08-06 11:30:49 -0700 |
commit | 64fe39358b3b56135a8954867d752206c593bfc4 (patch) | |
tree | 9ff540c94408d66bf4ad6b9cb4a671037755e59f /sdkmanager | |
parent | 128d49cc721b1b7bbbfa3add74d0d7c3a9726d72 (diff) | |
download | sdk-64fe39358b3b56135a8954867d752206c593bfc4.zip sdk-64fe39358b3b56135a8954867d752206c593bfc4.tar.gz sdk-64fe39358b3b56135a8954867d752206c593bfc4.tar.bz2 |
Increment count when backing up bad devices.xml
Fixes a bug where if you had devices.xml.old.0 in ~/.android, then the
DeviceManager would spin in an infinite loop because the count wouldn't
be incremented each time.
Change-Id: I525a0da120205ffb9e507bf1a83cb02f077ba76d
Diffstat (limited to 'sdkmanager')
-rw-r--r-- | sdkmanager/libs/sdklib/src/com/android/sdklib/devices/DeviceManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/devices/DeviceManager.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/devices/DeviceManager.java index c203231..d46ca5f 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/devices/DeviceManager.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/devices/DeviceManager.java @@ -198,7 +198,7 @@ public class DeviceManager { File renamedConfig = new File(base); int i = 0; while (renamedConfig.exists()) { - renamedConfig = new File(base+"."+i); + renamedConfig = new File(base + "." + (i++)); } mLog.error(null, "Error parsing %1$s, backing up to %2$s", userDevicesFile.getAbsolutePath(), renamedConfig.getAbsolutePath()); |