We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cd893a + 5aca36b commit 3b69c33Copy full SHA for 3b69c33
1 file changed
ImGuiFileDialog.cpp
@@ -559,8 +559,8 @@ class FileSystemDirent : public IGFD::IFileSystem {
559
// this func will fail
560
pDir = opendir(vName.c_str());
561
if (pDir != nullptr) {
562
- return true;
563
(void)closedir(pDir);
+ return true;
564
}
565
566
return false;
@@ -728,7 +728,12 @@ class FileSystemDirent : public IGFD::IFileSystem {
728
return res;
729
730
bool IsDirectory(const std::string& vFilePathName) override {
731
- return (opendir(vFilePathName.c_str()) != nullptr);
+ DIR *pDir = opendir(vFilePathName.c_str());
732
+ if (pDir) {
733
+ (void)closedir(pDir);
734
735
+ }
736
+ return false;
737
738
};
739
#define FILE_SYSTEM_OVERRIDE FileSystemDirent
0 commit comments