Skip to content

Commit

Permalink
fix: Incorrect duplicate filename handling when exporting files (ReVa…
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvanbhalara authored and TheAabedKhan committed Dec 1, 2023
1 parent c9412a9 commit de51fbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/services/patcher_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ void exportPatchedFile(String appName, String version) {
if (outFile != null) {
final String newName = _getFileName(appName, version);
FlutterFileDialog.saveFile(
params: SaveFileDialogParams(
params: SaveFileDialogParams(
sourceFilePath: outFile!.path,
fileName: newName,
mimeTypesFilter: ['application/vnd.android.package-archive'],
),
);
}
Expand Down Expand Up @@ -287,7 +288,7 @@ Future<void> exportPatcherLog(String logs) async {
final File log = File('${logDir.path}/$fileName');
log.writeAsStringSync(logs);
FlutterFileDialog.saveFile(
params: SaveFileDialogParams(
params:SaveFileDialogParams(
sourceFilePath: log.path,
fileName: fileName,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/views/settings/settings_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class SettingsViewModel extends BaseViewModel {
final String dateTime =
DateTime.now().toString().replaceAll(' ', '_').split('.').first;
await FlutterFileDialog.saveFile(
params: SaveFileDialogParams(
params: SaveFileDialogParams(
sourceFilePath: outFile.path,
fileName: 'selected_patches_$dateTime.json',
),
Expand Down Expand Up @@ -261,7 +261,7 @@ class SettingsViewModel extends BaseViewModel {
final String dateTime =
DateTime.now().toString().replaceAll(' ', '_').split('.').first;
await FlutterFileDialog.saveFile(
params: SaveFileDialogParams(
params: SaveFileDialogParams(
sourceFilePath: outFile.path,
fileName: 'keystore_$dateTime.keystore',
),
Expand Down

0 comments on commit de51fbd

Please sign in to comment.