File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
MaiChartManager/Controllers Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,9 @@ public void SetAquaMaiConfig(AquaMaiConfigDto.ConfigSaveDto config)
250250 if ( System . IO . File . Exists ( AquaMaiConfigPath ) )
251251 {
252252 Directory . CreateDirectory ( AquaMaiConfigBackupDirPath ) ;
253- System . IO . File . Move ( AquaMaiConfigPath , Path . Combine ( AquaMaiConfigBackupDirPath , $ "{ DateTime . Now : yyyy-MM-dd_HH-mm-ss} .toml") ) ;
253+ var backupPath = Path . Combine ( AquaMaiConfigBackupDirPath , $ "{ DateTime . Now : yyyy-MM-dd_HH-mm-ss} .toml") ;
254+ var originalContent = System . IO . File . ReadAllBytes ( AquaMaiConfigPath ) ;
255+ System . IO . File . WriteAllBytes ( backupPath , originalContent ) ;
254256 }
255257
256258 System . IO . File . WriteAllText ( Path . Combine ( StaticSettings . GamePath , "AquaMai.toml" ) , serializer . Serialize ( configEdit ) ) ;
You can’t perform that action at this time.
0 commit comments