chore: update cr_file_saver (#668)

Co-authored-by: Ushie <github@ushie.dev>
This commit is contained in:
Mipirakas 2023-01-30 13:11:31 +01:00 committed by GitHub
parent 40888c07f3
commit 8591bc4d01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 15 deletions

View file

@ -259,16 +259,8 @@ class PatcherAPI {
try {
if (_outFile != null) {
String newName = _getFileName(appName, version);
// This is temporary workaround to populate initial file name
// ref: https://github.com/Cleveroad/cr_file_saver/issues/7
int lastSeparator = _outFile!.path.lastIndexOf('/');
String newSourcePath =
_outFile!.path.substring(0, lastSeparator + 1) + newName;
_outFile!.copySync(newSourcePath);
CRFileSaver.saveFileWithDialog(SaveFileDialogParams(
sourceFilePath: newSourcePath, destinationFileName: newName));
sourceFilePath: _outFile!.path, destinationFileName: newName));
}
} on Exception catch (e, s) {
Sentry.captureException(e, stackTrace: s);