canonicalize before checking if file is already shared

pull/9/head
Zlatin Balevsky 2019-06-30 17:12:25 +01:00
parent f5e1833a48
commit d830d9261f
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ class DirectoryWatcher {
private static File join(Path parent, Path path) {
File parentFile = parent.toFile().getCanonicalFile()
new File(parentFile, path.toFile().getName())
new File(parentFile, path.toFile().getName()).getCanonicalFile()
}
private void publish() {

View File

@ -24,7 +24,7 @@ class HasherService {
}
void onFileSharedEvent(FileSharedEvent evt) {
if (fileManager.fileToSharedFile.containsKey(evt.file))
if (fileManager.fileToSharedFile.containsKey(evt.file.getCanonicalFile()))
return
executor.execute( { -> process(evt.file) } as Runnable)
}