|
24 | 24 | import ch.cyberduck.core.preferences.PreferencesReader; |
25 | 25 | import ch.cyberduck.core.transfer.TransferStatus; |
26 | 26 |
|
| 27 | +import org.irods.irods4j.high_level.connection.IRODSConnection; |
27 | 28 | import org.irods.irods4j.high_level.vfs.IRODSFilesystem; |
28 | 29 | import org.irods.irods4j.high_level.vfs.IRODSFilesystem.RemoveOptions; |
29 | 30 | import org.irods.irods4j.high_level.vfs.ObjectStatus; |
@@ -73,18 +74,19 @@ public void delete(final Map<Path, TransferStatus> files, final PasswordCallback |
73 | 74 | callback.delete(file); |
74 | 75 |
|
75 | 76 | try { |
76 | | - String absolute = file.getAbsolute(); |
77 | | - ObjectStatus status = IRODSFilesystem.status(session.getClient().getRcComm(), absolute); |
| 77 | + final IRODSConnection conn = session.getClient(); |
| 78 | + final String logicalPath = file.getAbsolute(); |
| 79 | + final ObjectStatus status = IRODSFilesystem.status(conn.getRcComm(), logicalPath); |
78 | 80 |
|
79 | 81 | if(!IRODSFilesystem.exists(status)) { |
80 | | - throw new NotfoundException(String.format("%s doesn't exist", absolute)); |
| 82 | + throw new NotfoundException(String.format("%s doesn't exist", logicalPath)); |
81 | 83 | } |
82 | 84 |
|
83 | 85 | if(status.getType() == ObjectType.DATA_OBJECT) { |
84 | | - IRODSFilesystem.remove(session.getClient().getRcComm(), absolute, removeOptions); |
| 86 | + IRODSFilesystem.remove(conn.getRcComm(), logicalPath, removeOptions); |
85 | 87 | } |
86 | 88 | else if(status.getType() == ObjectType.COLLECTION) { |
87 | | - IRODSFilesystem.removeAll(session.getClient().getRcComm(), absolute, removeOptions); |
| 89 | + IRODSFilesystem.removeAll(conn.getRcComm(), logicalPath, removeOptions); |
88 | 90 | } |
89 | 91 | } |
90 | 92 | catch(IOException | IRODSException e) { |
|
0 commit comments