mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 09:59:00 -07: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
@ -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 New Issue
Block a user