[PATCH] D28711: [libFuzzer] Same behaviour for `ListFilesInDirRecursive` when non existing directory.
Marcos Pividori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 21 18:09:46 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL292741: [libFuzzer] Fix ListFilesInDirRecursive() to do the same for Posix and Windows. (authored by mpividori).
Changed prior to commit:
https://reviews.llvm.org/D28711?vs=84401&id=85262#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28711
Files:
llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
Index: llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
+++ llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp
@@ -89,8 +89,10 @@
HANDLE FindHandle(FindFirstFileA(Path.c_str(), &FindInfo));
if (FindHandle == INVALID_HANDLE_VALUE)
{
- Printf("No file found in: %s.\n", Dir.c_str());
- return;
+ if (GetLastError() == ERROR_FILE_NOT_FOUND)
+ return;
+ Printf("No such directory: %s; exiting\n", Dir.c_str());
+ exit(1);
}
do {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28711.85262.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170122/578d77f4/attachment.bin>
More information about the llvm-commits
mailing list