#753 fixed workflow when moving to an album with insufficient storage
This commit is contained in:
parent
e86bf770ea
commit
67a4c68734
2 changed files with 5 additions and 3 deletions
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- crash when cataloguing some videos
|
- crash when cataloguing some videos
|
||||||
|
- workflow when moving to an album with insufficient storage
|
||||||
|
|
||||||
## <a id="v1.9.4"></a>[v1.9.4] - 2023-09-13
|
## <a id="v1.9.4"></a>[v1.9.4] - 2023-09-13
|
||||||
|
|
||||||
|
|
|
@ -154,9 +154,10 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
||||||
final originAlbums = entries.map((e) => e.directory).whereNotNull().toSet();
|
final originAlbums = entries.map((e) => e.directory).whereNotNull().toSet();
|
||||||
if ({MoveType.move, MoveType.toBin}.contains(moveType) && !await checkStoragePermissionForAlbums(context, originAlbums, entries: entries)) return;
|
if ({MoveType.move, MoveType.toBin}.contains(moveType) && !await checkStoragePermissionForAlbums(context, originAlbums, entries: entries)) return;
|
||||||
|
|
||||||
await Future.forEach<String>(destinationAlbums, (destinationAlbum) async {
|
final hasEnoughSpaceByDestination = await Future.wait(destinationAlbums.map((destinationAlbum) {
|
||||||
if (!await checkFreeSpaceForMove(context, entries, destinationAlbum, moveType)) return;
|
return checkFreeSpaceForMove(context, entries, destinationAlbum, moveType);
|
||||||
});
|
}));
|
||||||
|
if (hasEnoughSpaceByDestination.any((v) => !v)) return;
|
||||||
|
|
||||||
final l10n = context.l10n;
|
final l10n = context.l10n;
|
||||||
var nameConflictStrategy = NameConflictStrategy.rename;
|
var nameConflictStrategy = NameConflictStrategy.rename;
|
||||||
|
|
Loading…
Reference in a new issue