Index: chrome/browser/chromeos/drive/sync/entry_revert_performer.cc |
diff --git a/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc b/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc |
index 853039ee9de9f44149d366fe1219b34efcc4893b..fc7d06769e03577cd0004e0107ac8292ec4ebc56 100644 |
--- a/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc |
+++ b/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc |
@@ -40,7 +40,10 @@ FileError FinishRevert(ResourceMetadata* metadata, |
return error; |
} |
- const base::FilePath original_path = metadata->GetFilePath(local_id); |
+ base::FilePath original_path; |
+ error = metadata->GetFilePath(local_id, &original_path); |
+ if (error != FILE_ERROR_OK) |
+ return error; |
if (entry.deleted()) { |
error = metadata->RemoveEntry(local_id); |
@@ -59,7 +62,11 @@ FileError FinishRevert(ResourceMetadata* metadata, |
if (error != FILE_ERROR_OK) |
return error; |
- changed_directories->insert(metadata->GetFilePath(entry.parent_local_id())); |
+ base::FilePath new_parent_path; |
+ error = metadata->GetFilePath(entry.parent_local_id(), &new_parent_path); |
+ if (error != FILE_ERROR_OK) |
+ return error; |
+ changed_directories->insert(new_parent_path); |
changed_directories->insert(original_path.DirName()); |
} |
return FILE_ERROR_OK; |