diff --git a/lib/utils/file_util.dart b/lib/utils/file_util.dart index 61970ae2f..34ee1e4bd 100644 --- a/lib/utils/file_util.dart +++ b/lib/utils/file_util.dart @@ -22,6 +22,8 @@ import 'package:photos/models/file_type.dart'; import 'crypto_util.dart'; +final logger = Logger("FileUtil"); + Future deleteFiles(List files, {bool deleteEveryWhere = false}) async { await PhotoManager.editor @@ -143,7 +145,7 @@ Future getThumbnailFromServer(File file) async { Future _downloadAndDecrypt(File file, BaseCacheManager cacheManager, {ProgressCallback progressCallback}) async { - Logger("FileUtil").info("Downloading file " + file.toString()); + logger.info("Downloading file " + file.uploadedFileID.toString()); final encryptedFilePath = Configuration.instance.getTempDirectory() + file.generatedID.toString() + ".encrypted"; @@ -158,8 +160,7 @@ Future _downloadAndDecrypt(File file, BaseCacheManager cacheManager, ) .then((response) async { if (response.statusCode != 200) { - Logger("FileUtil") - .warning("Could not download file: ", response.toString()); + logger.warning("Could not download file: ", response.toString()); return null; } var attributes = ChaChaAttributes(