mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Perform saving all documents during move/rename in SvnFileSystemListener only if operations are related to files under svn - otherwise it could break functionality not related to svn (like renaming file under git) if svn plugin is enabled
This commit is contained in:
@@ -211,8 +211,6 @@ public class SvnFileSystemListener extends CommandAdapter implements LocalFileOp
|
||||
}
|
||||
|
||||
public boolean move(VirtualFile file, VirtualFile toDir) throws IOException {
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
File srcFile = getIOFile(file);
|
||||
File dstFile = new File(getIOFile(toDir), file.getName());
|
||||
|
||||
@@ -223,6 +221,8 @@ public class SvnFileSystemListener extends CommandAdapter implements LocalFileOp
|
||||
if (vcs == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
if (sourceVcs == null) {
|
||||
return createItem(toDir, file.getName(), file.isDirectory(), true);
|
||||
}
|
||||
@@ -241,12 +241,12 @@ public class SvnFileSystemListener extends CommandAdapter implements LocalFileOp
|
||||
}
|
||||
|
||||
public boolean rename(VirtualFile file, String newName) throws IOException {
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
File srcFile = getIOFile(file);
|
||||
File dstFile = new File(srcFile.getParentFile(), newName);
|
||||
SvnVcs vcs = getVCS(file);
|
||||
if (vcs != null) {
|
||||
FileDocumentManager.getInstance().saveAllDocuments();
|
||||
|
||||
myFilesToRefresh.add(file.getParent());
|
||||
return doMove(vcs, srcFile, dstFile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user