File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
Version 2.3.17:
2
2
3
+ * Remove old log file paths so they'll not be mistaken for current logs.
3
4
* Fix initial mute when option volume is set to 0.
4
5
* Updated translations: fi [Goingdown], pl [grimi], fr [Foul].
5
6
* (Launcher) Option download_file from DB does not have to be an archive.
Original file line number Diff line number Diff line change @@ -767,6 +767,32 @@ static void configure_logging(const char *logstr) {
767
767
}
768
768
}
769
769
770
+ static void cleanup_old_file (const char * path ) {
771
+ char * p = fs_uae_expand_path (path );
772
+ if (fs_path_exists (p )) {
773
+ if (fs_path_is_dir (p )) {
774
+ fs_log ("trying to remove old directory %s\n" , p );
775
+ fs_rmdir (p );
776
+ }
777
+ else {
778
+ fs_log ("trying to remove old file %s\n" , p );
779
+ fs_unlink (p );
780
+ }
781
+ }
782
+ free (p );
783
+ }
784
+
785
+ static void cleanup_old_files () {
786
+ // Logs are now stored in $BASE/Cache/Logs by default
787
+ cleanup_old_file ("$BASE/Logs/FS-UAE.log" );
788
+ cleanup_old_file ("$BASE/Logs/FS-UAE.log.txt" );
789
+ cleanup_old_file ("$BASE/Logs/DebugConfig.uae" );
790
+ cleanup_old_file ("$BASE/Logs/Launcher.log.txt" );
791
+ cleanup_old_file ("$BASE/Logs/Synchronization.log" );
792
+ // try to remove the dir - if it now is empty
793
+ cleanup_old_file ("$BASE/Logs" );
794
+ }
795
+
770
796
static const char * overlay_names [] = {
771
797
"df0_led" , // 0
772
798
"df1_led" , // 1
@@ -1118,5 +1144,6 @@ int main(int argc, char* argv[]) {
1118
1144
fs_uae_state_dir ());
1119
1145
}
1120
1146
fs_log ("end of main function\n" );
1147
+ cleanup_old_files ();
1121
1148
return 0 ;
1122
1149
}
You can’t perform that action at this time.
0 commit comments