-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove temporary .zip files generated during Lift import and export #791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec and @johnthagen)
Backend/Services/LiftApiServices.cs, line 271 at r1 (raw file):
Quoted 7 lines of code…
// Compress everything var destinationFileName = Path.Combine(exportDir, Path.Combine($"LiftExportCompressed-{proj.Id}_{DateTime.Now:yyyy-MM-dd_hh-mm-ss}.zip")); ZipFile.CreateFromDirectory(Path.GetDirectoryName(zipDir), destinationFileName); // Clean up the temporary folder structure that was compressed. Directory.Delete(Path.Combine(exportDir, "LiftExport"), true);
It looks like the zip file is created into exportDir
, which is then immediately deleted. Shouldn't zipDir
be deleted instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @imnasnainaec)
Backend/Services/LiftApiServices.cs, line 271 at r1 (raw file):
Previously, imnasnainaec (D. Ror.) wrote…
// Compress everything var destinationFileName = Path.Combine(exportDir, Path.Combine($"LiftExportCompressed-{proj.Id}_{DateTime.Now:yyyy-MM-dd_hh-mm-ss}.zip")); ZipFile.CreateFromDirectory(Path.GetDirectoryName(zipDir), destinationFileName); // Clean up the temporary folder structure that was compressed. Directory.Delete(Path.Combine(exportDir, "LiftExport"), true);
It looks like the zip file is created into
exportDir
, which is then immediately deleted. Shouldn'tzipDir
be deleted instead?
Sorry, never mind, I see that it's a subfolder of exportDir
(which contains zipDir
) that is being deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r1.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @johnthagen)
Codecov Report
@@ Coverage Diff @@
## master #791 +/- ##
==========================================
+ Coverage 51.21% 51.23% +0.02%
==========================================
Files 237 237
Lines 6428 6431 +3
Branches 410 410
==========================================
+ Hits 3292 3295 +3
Misses 2833 2833
Partials 303 303
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 3 files at r3, 2 of 2 files at r4.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnthagen)
Closes #786
Should help some with #656
The following files will no longer persist after an import in
.CombineFiles/<ProjectID>/Import
:<temp-name-with-date>.zip
Or after an export in
.CombineFiles/<ProjectID>/Export
:<temp-name>.zip
LiftExport
This change is