#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
|
||||
|
||||
- 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
|
||||
|
||||
|
|
|
@ -154,9 +154,10 @@ mixin EntryStorageMixin on FeedbackMixin, PermissionAwareMixin, SizeAwareMixin {
|
|||
final originAlbums = entries.map((e) => e.directory).whereNotNull().toSet();
|
||||
if ({MoveType.move, MoveType.toBin}.contains(moveType) && !await checkStoragePermissionForAlbums(context, originAlbums, entries: entries)) return;
|
||||
|
||||
await Future.forEach<String>(destinationAlbums, (destinationAlbum) async {
|
||||
if (!await checkFreeSpaceForMove(context, entries, destinationAlbum, moveType)) return;
|
||||
});
|
||||
final hasEnoughSpaceByDestination = await Future.wait(destinationAlbums.map((destinationAlbum) {
|
||||
return checkFreeSpaceForMove(context, entries, destinationAlbum, moveType);
|
||||
}));
|
||||
if (hasEnoughSpaceByDestination.any((v) => !v)) return;
|
||||
|
||||
final l10n = context.l10n;
|
||||
var nameConflictStrategy = NameConflictStrategy.rename;
|
||||
|
|
Loading…
Reference in a new issue