projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filter only '/' character in user input when version of server is 8.1 or later
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
dialog
/
RenameFileDialogFragment.java
diff --git
a/src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
b/src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
index
d285f1e
..
700a0ca
100644
(file)
--- a/
src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
+++ b/
src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
@@
-1,4
+1,7
@@
-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author David A. Velasco
* Copyright (C) 2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* Copyright (C) 2014 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
@@
-43,9
+46,7
@@
import com.owncloud.android.ui.activity.ComponentsGetter;
/**
* Dialog to input a new name for a file or folder to rename.
*
/**
* Dialog to input a new name for a file or folder to rename.
*
- * Triggers the rename operation when name is confirmed.
- *
- * @author David A. Velasco
+ * Triggers the rename operation when name is confirmed.
*/
public class RenameFileDialogFragment
extends SherlockDialogFragment implements DialogInterface.OnClickListener {
*/
public class RenameFileDialogFragment
extends SherlockDialogFragment implements DialogInterface.OnClickListener {
@@
-118,7
+119,9
@@
extends SherlockDialogFragment implements DialogInterface.OnClickListener {
return;
}
return;
}
- if (!FileUtils.isValidName(newFileName)) {
+ if (!FileUtils.isValidName(newFileName,
+ ((ComponentsGetter)getSherlockActivity()).
+ getFileOperationsHelper().isVersionWithForbiddenCharacters())) {
Toast.makeText(
getSherlockActivity(),
R.string.filename_forbidden_characters,
Toast.makeText(
getSherlockActivity(),
R.string.filename_forbidden_characters,
@@
-126,7
+129,8
@@
extends SherlockDialogFragment implements DialogInterface.OnClickListener {
return;
}
return;
}
- ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper().renameFile(mTargetFile, newFileName);
+ ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper().
+ renameFile(mTargetFile, newFileName);
}
}
}
}
}
}