summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-12-13 21:50:09 -0800
committerMike Lockwood <lockwood@android.com>2010-12-13 21:50:09 -0800
commitbafca214eaf326441e5157d645b2ee7fe8c7d1ab (patch)
tree9e8e8343b4e311b7fb1f54ada20236e94a8a16bf /media/mtp/MtpServer.cpp
parent1b198ea6856cb5db989a7f161b7516eeecf5ebc8 (diff)
downloadframeworks_base-bafca214eaf326441e5157d645b2ee7fe8c7d1ab.zip
frameworks_base-bafca214eaf326441e5157d645b2ee7fe8c7d1ab.tar.gz
frameworks_base-bafca214eaf326441e5157d645b2ee7fe8c7d1ab.tar.bz2
MTP: check for replacing existing files via the database instead of the file system
Change-Id: I283dab48f24d2836e48fab8e49764a9cdf13de55 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpServer.cpp')
-rw-r--r--media/mtp/MtpServer.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index b371e41..236cd0a 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -683,10 +683,6 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
path += "/";
path += (const char *)name;
- // file should not already exist
- if (access(path, R_OK) == 0)
- return MTP_RESPONSE_GENERAL_ERROR;
-
// check space first
if (mSendObjectFileSize > storage->getFreeSpace())
return MTP_RESPONSE_STORAGE_FULL;