improved error logging and handling
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:path_provider/path_provider.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:secure_archive/secure_archive.dart';
|
||||
import 'package:weblibre/core/filesystem.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/domain/entities/profile.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/profile.dart';
|
||||
|
||||
@@ -95,8 +96,12 @@ class UserBackupService extends _$UserBackupService {
|
||||
if (await outputDirectory.exists()) {
|
||||
await outputDirectory.delete(recursive: true);
|
||||
}
|
||||
} catch (_) {
|
||||
// Ignore cleanup errors
|
||||
} catch (e, s) {
|
||||
logger.w(
|
||||
'Failed to cleanup temporary backup directory: ${outputDirectory.path}',
|
||||
error: e,
|
||||
stackTrace: s,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ final class UserBackupServiceProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$userBackupServiceHash() => r'358e4c58703b14cff767184a4f658f7eac0454f6';
|
||||
String _$userBackupServiceHash() => r'cbeffa04bb52d3c7d50a2eb38678750f2a0362cc';
|
||||
|
||||
abstract class _$UserBackupService extends $Notifier<void> {
|
||||
void build();
|
||||
|
||||
Reference in New Issue
Block a user