| Index: chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| diff --git a/chrome/browser/chromeos/drive/file_system/create_file_operation.cc b/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| index 8e591cd895b5de47fbe81e7e0b6532457fc36e05..67cc830a546cfd7891e85598758c5152ad60b10c 100644
|
| --- a/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| +++ b/chrome/browser/chromeos/drive/file_system/create_file_operation.cc
|
| @@ -90,11 +90,15 @@ FileError UpdateLocalStateForCreateFile(
|
| if (!ConvertToResourceEntry(*resource_entry, &entry, &parent_resource_id))
|
| return FILE_ERROR_NOT_A_FILE;
|
|
|
| - // TODO(hashimoto): Resolve local ID before use. crbug.com/260514
|
| - entry.set_parent_local_id(parent_resource_id);
|
| + std::string parent_local_id;
|
| + FileError error = metadata->GetIdByResourceId(parent_resource_id,
|
| + &parent_local_id);
|
| + if (error != FILE_ERROR_OK)
|
| + return error;
|
| + entry.set_parent_local_id(parent_local_id);
|
|
|
| std::string local_id;
|
| - FileError error = metadata->AddEntry(entry, &local_id);
|
| + error = metadata->AddEntry(entry, &local_id);
|
|
|
| // Depending on timing, the metadata may have inserted via change list
|
| // already. So, FILE_ERROR_EXISTS is not an error.
|
|
|