mirror of
https://github.com/immich-app/immich.git
synced 2025-01-16 00:36:47 +01:00
fix(mobile): fix uncaught error in getting file cause hashing procses to be aborted entirely (#12826)
* fix(mobile): fix uncaught error in getting file cause hashing procses to be aborted entirely * log error
This commit is contained in:
parent
5a1a841365
commit
14169d310a
1 changed files with 13 additions and 1 deletions
|
@ -65,7 +65,19 @@ class HashService {
|
|||
if (hashes[i] != null) {
|
||||
continue;
|
||||
}
|
||||
final file = await assets[i].local!.originFile;
|
||||
|
||||
File? file;
|
||||
|
||||
try {
|
||||
file = await assets[i].local!.originFile;
|
||||
} catch (error, stackTrace) {
|
||||
_log.warning(
|
||||
"Error getting file to hash for asset ${assets[i].localId}, name: ${assets[i].fileName}, created on: ${assets[i].fileCreatedAt}, skipping",
|
||||
error,
|
||||
stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
if (file == null) {
|
||||
final fileName = assets[i].fileName;
|
||||
|
||||
|
|
Loading…
Reference in a new issue