From 5068b163b81950ef775ac567aea1a271eabe3985 Mon Sep 17 00:00:00 2001 From: kssenii Date: Wed, 5 May 2021 19:55:02 +0300 Subject: [PATCH] Fix --- src/Disks/DiskLocal.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Disks/DiskLocal.cpp b/src/Disks/DiskLocal.cpp index 64c599c5b81..99f0162cf12 100644 --- a/src/Disks/DiskLocal.cpp +++ b/src/Disks/DiskLocal.cpp @@ -69,7 +69,14 @@ public: bool isValid() const override { return entry != fs::directory_iterator(); } - String path() const override { return dir_path / entry->path().filename(); } + String path() const override + { + if (entry->is_directory()) + return dir_path / entry->path().filename() / ""; + else + return dir_path / entry->path().filename(); + } + String name() const override { return entry->path().filename(); }