From c2e9bc74a11427510cb13cc767265ce039d255e3 Mon Sep 17 00:00:00 2001 From: Dees Troy Date: Tue, 10 Sep 2013 00:16:24 +0000 Subject: Fix zip folder selection when storage path is similar If internal is /sdcard and external is /sdcard-ext then the zip path used to stay on /sdcard-ext when trying to switch to internal storage. Using Get_Root_Path instead of resizing will ensure that the path changes properly. --- data.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'data.cpp') diff --git a/data.cpp b/data.cpp index be76592aa..c766f0061 100644 --- a/data.cpp +++ b/data.cpp @@ -556,8 +556,7 @@ void DataManager::SetBackupFolder() if (zip_path.size() < storage_path.size()) { SetValue(TW_ZIP_LOCATION_VAR, storage_path); } else { - zip_root= zip_path; - zip_root.resize(storage_path.size()); + zip_root = TWFunc::Get_Root_Path(zip_path); if (zip_root != storage_path) { LOGINFO("DataManager::SetBackupFolder zip path was %s changing to %s, %s\n", zip_path.c_str(), storage_path.c_str(), zip_root.c_str()); SetValue(TW_ZIP_LOCATION_VAR, storage_path); -- cgit v1.2.3