From f989f544f4f323253e94d39eaee5b7ae1ffd63b0 Mon Sep 17 00:00:00 2001 From: RaymondLim Date: Mon, 10 Feb 2014 14:47:57 -0800 Subject: [PATCH 1/2] Convert paths to native in readdir function so that network drive can be open correctly. --- appshell/appshell_extensions_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp index c072b89ee..b12dc8b39 100644 --- a/appshell/appshell_extensions_win.cpp +++ b/appshell/appshell_extensions_win.cpp @@ -603,6 +603,10 @@ int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) path += '*'; + // Convert to native path to ensure that FindFirstFile and FindNextFile + // functions correctly for all paths including paths to a network drive. + ConvertToNativePath(path); + WIN32_FIND_DATA ffd; HANDLE hFind = FindFirstFile(path.c_str(), &ffd); From 651bfd6c1f2321ddbdbb9767050f19a6769b3efc Mon Sep 17 00:00:00 2001 From: RaymondLim Date: Mon, 10 Feb 2014 14:51:07 -0800 Subject: [PATCH 2/2] Fix the comment. --- appshell/appshell_extensions_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appshell/appshell_extensions_win.cpp b/appshell/appshell_extensions_win.cpp index b12dc8b39..2c98f8a7f 100644 --- a/appshell/appshell_extensions_win.cpp +++ b/appshell/appshell_extensions_win.cpp @@ -604,7 +604,7 @@ int32 ReadDir(ExtensionString path, CefRefPtr& directoryContents) path += '*'; // Convert to native path to ensure that FindFirstFile and FindNextFile - // functions correctly for all paths including paths to a network drive. + // function correctly for all paths including paths to a network drive. ConvertToNativePath(path); WIN32_FIND_DATA ffd;