Skip to content

Commit 28566e5

Browse files
committed
rename variable
1 parent 6901c32 commit 28566e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/org/cryptomator/cryptofs/CryptoFileSystemImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,18 +621,18 @@ private void moveDirectory(CryptoPath cleartextSource, CryptoPath cleartextTarge
621621
throw new AtomicMoveNotSupportedException(cleartextSource.toString(), cleartextTarget.toString(), "Replacing directories during move requires non-atomic status checks.");
622622
}
623623
// check if dir is empty:
624-
Path oldCiphertextDir = cryptoPathMapper.getCiphertextDir(cleartextTarget).path;
625-
boolean oldCiphertextDirExists = true;
626-
try (DirectoryStream<Path> ds = Files.newDirectoryStream(oldCiphertextDir)) {
624+
Path targetCiphertextDirContentDir = cryptoPathMapper.getCiphertextDir(cleartextTarget).path;
625+
boolean targetCiphertextDirExists = true;
626+
try (DirectoryStream<Path> ds = Files.newDirectoryStream(targetCiphertextDirContentDir)) {
627627
if (ds.iterator().hasNext()) {
628628
throw new DirectoryNotEmptyException(cleartextTarget.toString());
629629
}
630630
} catch (NoSuchFileException e) {
631-
oldCiphertextDirExists = false;
631+
targetCiphertextDirExists = false;
632632
}
633633
// cleanup dir to be replaced:
634-
if (oldCiphertextDirExists) {
635-
Files.walkFileTree(oldCiphertextDir, DeletingFileVisitor.INSTANCE);
634+
if (targetCiphertextDirExists) {
635+
Files.walkFileTree(targetCiphertextDirContentDir, DeletingFileVisitor.INSTANCE);
636636
}
637637
Files.walkFileTree(ciphertextTarget.getRawPath(), DeletingFileVisitor.INSTANCE);
638638
}

0 commit comments

Comments
 (0)