New issue
Advanced search Search tips

Issue 675868 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Share the logic to rename files on duplication

Project Member Reported by nya@chromium.org, Dec 20 2016

Issue description

In File System API (and thus in Files.app) files are identified by file names, so duplicated file names are not allowed. However some file system backends allow it (e.g. Google Drive and Android Documents Provider), so we rename those files on presenting files to users.

Currently we have at least two implementation to do this work:
- components/drive/chromeos/resource_metadata.cc
- chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc

We want to consolidate the implementation. Maybe we can place a shared util in storage/browser/fileapi.

 
Namely, two functions in components/drive:
 - GetUniquifiedName() in resource_metadata.cc which appends "(<number>)" to a file name.
 - NormalizeFileName() in file_system_core_util.cc which handles "/" in file names, and "." and "..".
Components: Platform>Apps>Core

Sign in to add a comment