* support for HARDLINK_OR_COPY action
This commit is contained in:
parent
ad78796bec
commit
6d4cbbcdea
|
@ -72,10 +72,22 @@ public enum StandardRenameAction implements RenameAction {
|
|||
}
|
||||
},
|
||||
|
||||
HARDLINK_OR_COPY {
|
||||
|
||||
@Override
|
||||
public File rename(File from, File to) throws Exception {
|
||||
try {
|
||||
return HARDLINK.rename(from, to);
|
||||
} catch (Exception e) {
|
||||
return COPY.rename(from, to);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
RENAME {
|
||||
|
||||
@Override
|
||||
public File rename(File from, File to) throws IOException {
|
||||
public File rename(File from, File to) throws Exception {
|
||||
// rename only the filename
|
||||
File dest = new File(from.getParentFile(), to.getName());
|
||||
|
||||
|
|
Loading…
Reference in New Issue