From: David A. Velasco Date: Fri, 26 Oct 2012 11:49:03 +0000 (+0200) Subject: Character % is rejected for names of files when renaming X-Git-Tag: oc-android-1.4.3~127 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/30c934fe37872b2f1e57678299df24b05b0b873d Character % is rejected for names of files when renaming --- diff --git a/src/com/owncloud/android/operations/RenameFileOperation.java b/src/com/owncloud/android/operations/RenameFileOperation.java index 58b792ee..709eda2b 100644 --- a/src/com/owncloud/android/operations/RenameFileOperation.java +++ b/src/com/owncloud/android/operations/RenameFileOperation.java @@ -152,12 +152,14 @@ public class RenameFileOperation extends RemoteOperation { * IMPORTANT: The test must be made in the same file system where files are download. The internal storage * could be formatted with a different file system. * + * TODO move this method, and maybe FileDownload.get***Path(), to a class with utilities specific for the interactions with the file system + * * @return 'True' if a temporal file named with the name to set could be created in the file system where * local files are stored. */ private boolean isValidNewName() { // check tricky names - if (mNewName == null || mNewName.length() <= 0 || mNewName.contains(File.separator)) { + if (mNewName == null || mNewName.length() <= 0 || mNewName.contains(File.separator) || mNewName.contains("%")) { return false; } // create a test file