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

Unified Diff: chrome/browser/resources/file_manager/js/file_copy_manager.js

Issue 10342010: Add gdata content search to file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some fixes Created 8 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
Index: chrome/browser/resources/file_manager/js/file_copy_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_copy_manager.js b/chrome/browser/resources/file_manager/js/file_copy_manager.js
index 9ca7903d538980646e6250b0e0dbe9c3ca035e31..8ba24876ab695623696089c5f600ed092b2644e6 100644
--- a/chrome/browser/resources/file_manager/js/file_copy_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_copy_manager.js
@@ -491,6 +491,23 @@ FileCopyManager.prototype.serviceNextTaskEntry_ = function(
var targetDirEntry = task.targetDirEntry;
var originalPath = sourceEntry.fullPath.substr(sourcePath.length + 1);
+
+ // If the source entry is GData search result, we should not use the file name
+ // we get from file entry (this will be in format
+ // resource_id.original_file_name). Instead, we should use original_file_name.
+ // Note that if the entry is GData search result, it can only be imediate
dgozman 2012/05/03 11:21:47 typo: imediate
tbarzic 2012/05/03 19:16:02 Done.
+ // child of |task.sourceDirEntry|, so originalPath should be equal to
+ // gdataSearchResult.fileName.
+ var gdataSearchResult =
+ util.getFileAndDisplayNameForGDataSearchResult(sourceEntry.fullPath);
+ if (gdataSearchResult && originalPath == gdataSearchResult.fileName) {
+ if (sourceEntry.isDirectory) {
+ task.registerRename(gdataSearchResult.fileName,
dgozman 2012/05/03 11:21:47 I think, you have to register full paths here inst
tbarzic 2012/05/03 19:16:02 Don't we register paths relative to sourceDir. Sin
+ gdataSearchResult.displayName);
+ }
+ originalPath = gdataSearchResult.displayName;
dgozman 2012/05/03 11:21:47 For directory, you do: 1. register rename 2. chang
tbarzic 2012/05/03 19:16:02 registered rename paths are automatically appended
+ }
+
originalPath = task.applyRenames(originalPath);
var targetRelativePrefix = originalPath;

Powered by Google App Engine
This is Rietveld 408576698