add: rename() in files module

This commit is contained in:
hyb1996
2017-07-30 16:15:11 +08:00
parent fed7b97deb
commit d44a7921df
3 changed files with 22 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ public class SharedPrefScriptFileList extends ScriptFileList {
public void rename(int position, String newName, boolean renameFile) {
mScriptName.set(position, newName);
if (renameFile) {
String newPath = PFile.renameWithoutExtension(mScriptPath.get(position), newName);
String newPath = PFile.renameWithoutExtensionAndReturnNewPath(mScriptPath.get(position), newName);
mScriptPath.set(position, newPath);
}
syncWithSharedPref();