Changeset 36187 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Mar 7, 2011 1:52:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r36181 r36187 6062 6062 strTarget.stripFilename(); 6063 6063 if (RTPathStartsWith(strSource.c_str(), strTarget.c_str())) 6064 { 6064 6065 // is relative: then append what's left 6065 6066 strTarget = strSource.substr(strTarget.length() + 1); // skip '/' 6067 // for empty paths (only possible for subdirs) use "." to avoid 6068 // triggering default settings for not present config attributes. 6069 if (strTarget.isEmpty()) 6070 strTarget = "."; 6071 } 6066 6072 else 6067 6073 // is not relative: then overwrite … … 8028 8034 8029 8035 Utf8Str configFile, newConfigFile; 8036 Utf8Str configFilePrev, newConfigFilePrev; 8030 8037 Utf8Str configDir, newConfigDir; 8031 8038 … … 8093 8100 } 8094 8101 fileRenamed = true; 8102 configFilePrev = configFile; 8103 configFilePrev += "-prev"; 8104 newConfigFilePrev = newConfigFile; 8105 newConfigFilePrev += "-prev"; 8106 RTFileRename(configFilePrev.c_str(), newConfigFilePrev.c_str(), 0); 8095 8107 } 8096 8108 } … … 8127 8139 /* silently try to rename everything back */ 8128 8140 if (fileRenamed) 8141 { 8142 RTFileRename(newConfigFilePrev.c_str(), configFilePrev.c_str(), 0); 8129 8143 RTFileRename(newConfigFile.c_str(), configFile.c_str(), 0); 8144 } 8130 8145 if (dirRenamed) 8131 8146 RTPathRename(newConfigDir.c_str(), configDir.c_str(), 0);
Note:
See TracChangeset
for help on using the changeset viewer.