Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Unified Diff: ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js

Issue 1093433003: Generate thumbnails except when IO error of metadata fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js
diff --git a/ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js b/ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js
index c09c769f1623a78eb3adb7d18663904e190ddafe..c59b334267e55f888c3fb5f6114e6a0deda6802e 100644
--- a/ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js
+++ b/ui/file_manager/file_manager/foreground/js/list_thumbnail_loader.js
@@ -411,8 +411,12 @@ ListThumbnailLoader.Task = function(
*/
ListThumbnailLoader.Task.prototype.fetch = function() {
return this.thumbnailModel_.get([this.entry_]).then(function(metadatas) {
- // When an error happens during metadata fetch, abort here.
- if (metadatas[0].thumbnail.urlError)
+ // When it failed to read exif header with an IO error, do not generate
+ // thumbnail at this time since it may success in the second try. If it
+ // failed to read at 0 byte, it would be an IO error.
+ if (metadatas[0].thumbnail.urlError &&
+ metadatas[0].thumbnail.urlError.errorDescription ===
+ 'Error: Unexpected EOF @0')
throw metadatas[0].thumbnail.urlError;
return new this.thumbnailLoaderConstructor_(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698