Commit 19447ac5 authored by Kenton Varda's avatar Kenton Varda

Fix Windows: FindFirstFile globs had two backslashes before *, should have had one.

parent 0b6f50d6
...@@ -149,7 +149,7 @@ static String dbgStr(ArrayPtr<const wchar_t> wstr) { ...@@ -149,7 +149,7 @@ static String dbgStr(ArrayPtr<const wchar_t> wstr) {
} }
static void rmrfChildren(ArrayPtr<const wchar_t> path) { static void rmrfChildren(ArrayPtr<const wchar_t> path) {
auto glob = join16(path, L"\\*"); auto glob = join16(path, L"*");
// According to Niall Douglas, on Windows, deleting all files in a directory requires repeatedly // According to Niall Douglas, on Windows, deleting all files in a directory requires repeatedly
// scanning the directory until it is found to be empty. I couldn't find an explanation why, but // scanning the directory until it is found to be empty. I couldn't find an explanation why, but
...@@ -558,7 +558,7 @@ public: ...@@ -558,7 +558,7 @@ public:
auto list(bool needTypes, Func&& func) auto list(bool needTypes, Func&& func)
-> Array<Decay<decltype(func(instance<StringPtr>(), instance<FsNode::Type>()))>> { -> Array<Decay<decltype(func(instance<StringPtr>(), instance<FsNode::Type>()))>> {
PathPtr path = KJ_ASSERT_NONNULL(dirPath); PathPtr path = KJ_ASSERT_NONNULL(dirPath);
auto glob = join16(path.forWin32Api(true), L"\\*"); auto glob = join16(path.forWin32Api(true), L"*");
// TODO(perf): Use FindFileEx() with FindExInfoBasic? Not apparently supported on Vista. // TODO(perf): Use FindFileEx() with FindExInfoBasic? Not apparently supported on Vista.
// TODO(someday): Use NtQueryDirectoryObject() instead? It's "internal", but so much cleaner. // TODO(someday): Use NtQueryDirectoryObject() instead? It's "internal", but so much cleaner.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment