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.
This commit is contained in:
3
data.cpp
3
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);
|
||||
|
||||
Reference in New Issue
Block a user