mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 18:21:26 +00:00
fixed bug causing directories to disappear immediately after renaming to a long name.
This commit is contained in:
@@ -46,4 +46,15 @@ class ShorteningFile extends DelegatingFile<ShorteningFolder> {
|
||||
return super.openWritable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveTo(File destination) {
|
||||
super.moveTo(destination);
|
||||
if (destination instanceof ShorteningFile) {
|
||||
ShorteningFile dest = (ShorteningFile) destination;
|
||||
if (shortener.isShortened(dest.shortenedName())) {
|
||||
shortener.saveMapping(dest.name(), dest.shortenedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user