mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Incorrect duplicate filename handling when exporting files (#1541)
This commit is contained in:
parent
c9412a97d0
commit
de51fbd7be
@ -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'],
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -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,
|
||||
),
|
||||
|
@ -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',
|
||||
),
|
||||
@ -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',
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user