1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* support for HARDLINK_OR_COPY action

This commit is contained in:
Reinhard Pointner 2014-08-10 07:11:09 +00:00
parent ad78796bec
commit 6d4cbbcdea

View File

@ -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());