diff --git a/lib/moving.dart b/lib/moving.dart index b79a7a69..1b60e0df 100644 --- a/lib/moving.dart +++ b/lib/moving.dart @@ -135,7 +135,15 @@ Stream moveFiles( result = await moveFile(); mainFile = result; } else if (albumBehavior == 'shortcut' && mainFile != null) { - result = await createShortcut(folder, mainFile); + try { + result = await createShortcut(folder, mainFile); + } catch (e) { + // in case powershell fails/whatever + print('Creating shortcut for ' + '${p.basename(mainFile.path)} in ${p.basename(folder.path)} ' + 'failed :( - coping normal file instead'); + result = await moveFile(); + } } else { // else - if we either run duplicate-copy or main file is missing: // (this happens with archive/trash/weird situation)