Index: ui/file_manager/file_manager/foreground/js/media/media_util.js |
diff --git a/ui/file_manager/file_manager/foreground/js/media/media_util.js b/ui/file_manager/file_manager/foreground/js/media/media_util.js |
index aa7d0dfec4a0cd68df2d2c7362f6554754bf3e72..5d57852d247096f6994e5a1010f619275dc66174 100644 |
--- a/ui/file_manager/file_manager/foreground/js/media/media_util.js |
+++ b/ui/file_manager/file_manager/foreground/js/media/media_util.js |
@@ -49,6 +49,13 @@ function ThumbnailLoader(entry, opt_loaderType, opt_metadata, opt_mediaType, |
}; |
} |
+ // If the file is on the drive and it is present, the file may be out of sync |
+ // drive's thumbnail. So we don't use it. |
+ if (opt_metadata.drive && opt_metadata.drive.present) { |
+ opt_metadata = MetadataCache.cloneMetadata(opt_metadata); |
+ opt_metadata.thumbnail = null; |
+ } |
+ |
if (opt_metadata.thumbnail && opt_metadata.thumbnail.url && |
opt_useEmbedded === ThumbnailLoader.UseEmbedded.USE_EMBEDDED) { |
this.thumbnailUrl_ = opt_metadata.thumbnail.url; |
@@ -181,6 +188,14 @@ ThumbnailLoader.prototype.load = function(box, fillMode, opt_optimizationMode, |
this.metadata_.filesystem && |
this.metadata_.filesystem.modificationTime && |
this.metadata_.filesystem.modificationTime.getTime(); |
+ |
+ // If the file is on the drive, the modificationTime is inaccurate. |
+ // If the drive.present is true, the file may be editted on the local, so we |
+ // need to force to update of the file. |
mtomasz
2014/06/02 06:40:28
Please note that this is a workaround for a bug. I
hirono
2014/06/02 08:59:15
I changed the code so that the app invalidates the
|
+ if (this.metadata_ && this.metadata_.drive && this.metadata_.drive.present) { |
+ modificationTime = Date.now(); |
+ } |
+ |
this.taskId_ = util.loadImage( |
this.image_, |
this.thumbnailUrl_, |