Merge pull request #96 from ThomasFok/fix/mkdir

acx - Filter out deleted file entries in MkdirCommand
This commit is contained in:
A2 Geek 2023-02-12 12:32:54 -06:00 committed by GitHub
commit 09053d699b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,7 @@ public class MkdirCommand extends ReadWriteDiskCommandOptions {
final String pathName = formattedDisk.getSuggestedFilename(paths[i]);
Optional<FileEntry> optEntry = directory.getFiles().stream()
.filter(entry -> entry.getFilename().equalsIgnoreCase(pathName))
.filter(entry -> !entry.isDeleted())
.findFirst();
if (optEntry.isPresent()) {