@@ -58,6 +58,7 @@ process.on("uncaughtException", (error) => {
5858 app . quit ( ) ;
5959} ) ;
6060
61+
6162// Defer autoUpdater configuration
6263function configureAutoUpdater ( ) {
6364 try {
@@ -412,7 +413,7 @@ ipcMain.handle("decrypt", async (event, { packedKeys, method, isSaveHistory }) =
412413 if ( decrypted !== "invalid" ) {
413414 if ( isSaveHistory ) {
414415 await trySaveHistory (
415- "dtext " ,
416+ "dtext_logs " ,
416417 "success" ,
417418 "" ,
418419 "" ,
@@ -423,7 +424,7 @@ ipcMain.handle("decrypt", async (event, { packedKeys, method, isSaveHistory }) =
423424 } else {
424425 if ( isSaveHistory ) {
425426 await trySaveHistory (
426- "dtext " ,
427+ "dtext_logs " ,
427428 "fail" ,
428429 "" ,
429430 "" ,
@@ -450,7 +451,7 @@ ipcMain.handle("encrypt", async (event, { text, method, isSaveHistory, isShareab
450451
451452 if ( isSaveHistory ) {
452453 await trySaveHistory (
453- "etext " ,
454+ "etext_logs " ,
454455 "success" ,
455456 "" ,
456457 "" ,
@@ -491,7 +492,7 @@ ipcMain.handle(
491492 } ) ;
492493 if ( canceled || ! filePaths . length ) {
493494 if ( isSaveHistory )
494- await trySaveHistory ( "efile " , "canceled" , "" , "" , method , startTime ) ;
495+ await trySaveHistory ( "efile_logs " , "canceled" , "" , "" , method , startTime ) ;
495496 return [ ] ;
496497 }
497498 outputFolder = filePaths [ 0 ] ;
@@ -517,7 +518,7 @@ ipcMain.handle(
517518 if ( canceled || ! savePath ) {
518519 if ( isSaveHistory )
519520 await trySaveHistory (
520- "efile " ,
521+ "efile_logs " ,
521522 "canceled" ,
522523 filePath ,
523524 "" ,
@@ -539,7 +540,7 @@ ipcMain.handle(
539540 ) ;
540541 if ( isSaveHistory )
541542 await trySaveHistory (
542- "efile " ,
543+ "efile_logs " ,
543544 "success" ,
544545 filePath ,
545546 encryptedPath ,
@@ -558,7 +559,7 @@ ipcMain.handle(
558559 console . error ( "Encryption failed:" , err ) ;
559560 if ( isSaveHistory )
560561 await trySaveHistory (
561- "efile " ,
562+ "efile_logs " ,
562563 "canceled" ,
563564 filePath ,
564565 finalOutputPath ,
@@ -598,7 +599,7 @@ ipcMain.handle(
598599
599600 if ( canceled || filePaths . length === 0 ) {
600601 if ( isSaveHistory ) {
601- await trySaveHistory ( "dfile " , "canceled" , "N/A" , "N/A" , method , startTime ) ;
602+ await trySaveHistory ( "dfile_logs " , "canceled" , "N/A" , "N/A" , method , startTime ) ;
602603 }
603604 return [ ] ;
604605 }
@@ -621,7 +622,7 @@ ipcMain.handle(
621622 if ( validate === "bad_validate" ) {
622623 if ( isSaveHistory ) {
623624 await trySaveHistory (
624- "dfile " ,
625+ "dfile_logs " ,
625626 "fail" ,
626627 filePath ,
627628 filePath ,
@@ -635,7 +636,7 @@ ipcMain.handle(
635636 } catch {
636637 if ( isSaveHistory ) {
637638 await trySaveHistory (
638- "dfile " ,
639+ "dfile_logs " ,
639640 "fail" ,
640641 filePath ,
641642 filePath ,
@@ -665,7 +666,7 @@ ipcMain.handle(
665666 if ( canceled || ! savePath ) {
666667 if ( isSaveHistory ) {
667668 await trySaveHistory (
668- "dfile " ,
669+ "dfile_logs " ,
669670 "canceled" ,
670671 filePath ,
671672 filePath ,
@@ -690,7 +691,7 @@ ipcMain.handle(
690691 if ( decryptedPath === "bad_decrypt" ) {
691692 if ( isSaveHistory ) {
692693 await trySaveHistory (
693- "dfile " ,
694+ "dfile_logs " ,
694695 "fail" ,
695696 filePath ,
696697 "" ,
@@ -701,7 +702,7 @@ ipcMain.handle(
701702 } else {
702703 if ( isSaveHistory ) {
703704 await trySaveHistory (
704- "dfile " ,
705+ "dfile_logs " ,
705706 "success" ,
706707 filePath ,
707708 decryptedPath ,
@@ -724,7 +725,7 @@ ipcMain.handle(
724725 console . error ( "Decryption failed:" , err ) ;
725726 if ( isSaveHistory ) {
726727 await trySaveHistory (
727- "dfile " ,
728+ "dfile_logs " ,
728729 "canceled" ,
729730 filePath ,
730731 finalOutputPath ,
@@ -773,7 +774,7 @@ ipcMain.handle(
773774 results . push ( { inputPath : imagePath , output : "canceled" } ) ;
774775 if ( isSaveHistory )
775776 await trySaveHistory (
776- "steg-in " ,
777+ "steg-in_logs " ,
777778 "canceled" ,
778779 imagePath ,
779780 "N/A" ,
@@ -790,7 +791,7 @@ ipcMain.handle(
790791 results . push ( { inputPath : imagePath , output : result . response } ) ;
791792 if ( isSaveHistory )
792793 await trySaveHistory (
793- "steg-in " ,
794+ "steg-in_logs " ,
794795 "fail" ,
795796 imagePath ,
796797 result . response ,
@@ -803,7 +804,7 @@ ipcMain.handle(
803804 results . push ( { inputPath : imagePath , output : result . outputPath } ) ;
804805 if ( isSaveHistory )
805806 await trySaveHistory (
806- "steg-in " ,
807+ "steg-in_logs " ,
807808 "success" ,
808809 imagePath ,
809810 result . outputPath ,
@@ -825,7 +826,7 @@ ipcMain.handle(
825826 console . error ( "Data hiding error:" , error ) ;
826827 results . push ( { inputPath : imagePath , output : "fail" } ) ;
827828 if ( isSaveHistory )
828- await trySaveHistory ( "steg-in " , "fail" , imagePath , "N/A" , method , startTime ) ;
829+ await trySaveHistory ( "steg-in_logs " , "fail" , imagePath , "N/A" , method , startTime ) ;
829830 }
830831 }
831832
@@ -858,7 +859,7 @@ ipcMain.handle(
858859
859860 if ( canceled || filePaths . length === 0 ) {
860861 if ( isSaveHistory ) {
861- await trySaveHistory ( "steg-out " , "canceled" , "N/A" , "N/A" , method , startTime ) ;
862+ await trySaveHistory ( "steg-out_logs " , "canceled" , "N/A" , "N/A" , method , startTime ) ;
862863 }
863864 return [ ] ;
864865 }
@@ -874,7 +875,7 @@ ipcMain.handle(
874875 results . push ( { inputPath : filePath , output : "BAD_EXTRACT" } ) ;
875876 if ( isSaveHistory ) {
876877 await trySaveHistory (
877- "steg-out " ,
878+ "steg-out_logs " ,
878879 "fail" ,
879880 filePath ,
880881 "N/A" ,
@@ -905,7 +906,7 @@ ipcMain.handle(
905906 results . push ( { inputPath : filePath , output : "canceled" } ) ;
906907 if ( isSaveHistory ) {
907908 await trySaveHistory (
908- "steg-out " ,
909+ "steg-out_logs " ,
909910 "canceled" ,
910911 filePath ,
911912 "N/A" ,
@@ -932,7 +933,7 @@ ipcMain.handle(
932933
933934 if ( isSaveHistory ) {
934935 await trySaveHistory (
935- "steg-out " ,
936+ "steg-out_logs " ,
936937 "success" ,
937938 filePath ,
938939 movedPaths . join ( "," ) ,
@@ -954,7 +955,7 @@ ipcMain.handle(
954955 console . error ( "Extraction failed:" , err ) ;
955956 results . push ( { inputPath : filePath , output : "fail" } ) ;
956957 if ( isSaveHistory ) {
957- await trySaveHistory ( "steg-out " , "fail" , filePath , "N/A" , method , startTime ) ;
958+ await trySaveHistory ( "steg-out_logs " , "fail" , filePath , "N/A" , method , startTime ) ;
958959 }
959960 }
960961 }
0 commit comments