Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad7c6f9

Browse filesBrowse files
committed
added handling for when file does not exist
1 parent 81b6287 commit ad7c6f9
Copy full SHA for ad7c6f9

File tree

1 file changed

+3
-0
lines changed
Filter options

1 file changed

+3
-0
lines changed

‎utils/types.cpp

Copy file name to clipboardExpand all lines: utils/types.cpp
+3
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ Directory :: Directory (const std::string& path) {
159159

160160
if (fs::directory_entry(path).exists() && !fs::directory_entry(path).is_directory()) {
161161
paths_h.emplace_back(get_file_info(fs::directory_entry(path)));
162+
} else if(!fs::directory_entry(path).exists()) {
163+
std::cout << red("OS Error (2): Path does not exist.") << std::endl;
164+
std::exit(1);
162165
} else {
163166
for (const fs::directory_entry& i : get_files(path)) {
164167
paths_h.emplace_back(get_file_info(i));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.