X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fio%2Ffilesystem.cpp;h=c916e15427aca02ccbbb4042c5e4f34050ce60ed;hp=feb1cac7d0bcc2ef7a0aab77b28312e155249470;hb=23f1f41fbff03520bb291e42b0407e0ca0bd4cc9;hpb=01cc65097f27ad657130fb58a10813e8d5c09fe7 diff --git a/src/io/filesystem.cpp b/src/io/filesystem.cpp index feb1cac..c916e15 100644 --- a/src/io/filesystem.cpp +++ b/src/io/filesystem.cpp @@ -186,6 +186,9 @@ bool remove_dir(const std::string &path) { #else DIR *dir = opendir(path.c_str()); + if (!dir) { + return errno == ENOENT; + } for (dirent *entry = readdir(dir); entry != nullptr; entry = readdir(dir)) { if ( strncmp(entry->d_name, ".", 2) == 0 ||