-/* 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
/**
* 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 {
return;
}
- if (!FileUtils.isValidName(newFileName)) {
+ if (!FileUtils.isValidName(newFileName,
+ ((ComponentsGetter)getSherlockActivity()).
+ getFileOperationsHelper().isVersionWithForbiddenCharacters())) {
Toast.makeText(
getSherlockActivity(),
R.string.filename_forbidden_characters,
return;
}
- ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper().renameFile(mTargetFile, newFileName);
+ ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper().
+ renameFile(mTargetFile, newFileName);
}
}
}