|
|
|
@ -79,16 +79,16 @@ public class FileOperationHelper {
|
|
|
|
|
public boolean checkFreeOrLock(ExpandMutableTreeNode node, ArrayList<ExpandMutableTreeNode> dNodes, ArrayList<ExpandMutableTreeNode> lNodes) { |
|
|
|
|
// 自己没锁
|
|
|
|
|
boolean selfEmptyLock = false; |
|
|
|
|
boolean isDir = false; |
|
|
|
|
boolean dir = false; |
|
|
|
|
Object userObj = node.getUserObject(); |
|
|
|
|
if (userObj instanceof FileNode) { |
|
|
|
|
FileNode fileNode = (FileNode) userObj; |
|
|
|
|
String lock = fileNode.getLock(); |
|
|
|
|
selfEmptyLock = lock == null || fileNode.getUserID().equals(lock); |
|
|
|
|
isDir = fileNode.isDirectory(); |
|
|
|
|
dir = fileNode.isDirectory(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!isDir) { |
|
|
|
|
if (!dir) { |
|
|
|
|
if (selfEmptyLock) { |
|
|
|
|
dNodes.add(node); |
|
|
|
|
} else { |
|
|
|
|