server/apps
Adam Williamson 415411a3d5 google: delete original after successful rename
In GDrive, filenames aren't unique, and directories are just
special files - so you can have multiple files with the same
name, multiple directories with the same name, and even files
with the same names as directories.

OC doesn't handle this at all, though, and just wants to act
as if file and directory names *are* unique. So when renaming,
we must check if there's an existing object with the same
file or directory name before we commit the rename, and
explicitly delete it if the rename is successful. (Other
providers like dropbox do the same for files, but intentionally
don't do it for directories; we really need to do it for
directories too.)

A good way to observe this is to run the storage unit tests
and look at the state of the Drive afterwards. Without this
commit, there will be several copies of all the test files
and directories. After this commit, there's just one of each.

We can't just say "hey, Drive lets us do this, what's the
problem?" because we don't handle multiple-objects, same-name
cases - getDriveFile() just bails and prints an error if it
searches for the file or directory with a given name and gets
multiple results.
2014-11-30 15:34:35 -08:00
..
files [tx-robot] updated from transifex 2014-11-28 01:55:29 -05:00
files_encryption Merge pull request #12421 from owncloud/issue/6101-remove-namespace-permission-constants 2014-11-26 08:31:23 +01:00
files_external google: delete original after successful rename 2014-11-30 15:34:35 -08:00
files_sharing [tx-robot] updated from transifex 2014-11-29 01:54:28 -05:00
files_trashbin [tx-robot] updated from transifex 2014-11-28 01:55:29 -05:00
files_versions Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
user_ldap [tx-robot] updated from transifex 2014-11-30 01:54:25 -05:00
user_webdavauth [tx-robot] updated from transifex 2014-11-21 02:54:26 -05:00