File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -92,20 +92,26 @@ const startClicked = async () => {
9292 statusValidating .value = ImportStatus .Failed ;
9393 errorMessages .value .push (` ${e } ` );
9494 importFailed .value = true ;
95- await window .electron .X .deleteUnzippedXArchive (props .model .account .id , unzippedPath );
95+ // Only delete the unzipped archive if we extracted it from a ZIP file
96+ if (isZip ) {
97+ await window .electron .X .deleteUnzippedXArchive (props .model .account .id , unzippedPath );
98+ }
9699 return ;
97100 }
98101 if (verifyResp !== null ) {
99102 statusValidating .value = ImportStatus .Failed ;
100103 errorMessages .value .push (verifyResp );
101104 importFailed .value = true ;
102- await window .electron .X .deleteUnzippedXArchive (props .model .account .id , unzippedPath );
105+ // Only delete the unzipped archive if we extracted it from a ZIP file
106+ if (isZip ) {
107+ await window .electron .X .deleteUnzippedXArchive (props .model .account .id , unzippedPath );
108+ }
103109 return ;
104110 }
105111 statusValidating .value = ImportStatus .Finished ;
106112
107113 // After unzipping and verifying, if we're in archive-only mode, the unzippedPath has changed
108- if (props .model .account ?.xAccount ?.archiveOnly ) {
114+ if (props .model .account ?.xAccount ?.archiveOnly && isZip ) {
109115 unzippedPath = await window .electron .getAccountDataPath (props .model .account .id , " tmp" );
110116 if (! unzippedPath ) {
111117 statusValidating .value = ImportStatus .Failed ;
You can’t perform that action at this time.
0 commit comments