mirror of https://github.com/zlatinb/muwire
canonicalize before checking if file is already shared
parent
f5e1833a48
commit
d830d9261f
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue