File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1616#include < sstream>
1717#include < algorithm>
1818#include < memory>
19- #include < locale>
20- #include < codecvt>
2119
2220#ifdef _WIN32
2321#include < io.h>
2422#include < direct.h>
2523#include < windows.h>
2624#include < winbase.h> /* needed for memory mapping of file functions */
25+ #include < shlwapi.h>
2726
2827struct dir_handle_deleter {
2928 typedef HANDLE pointer;
@@ -686,7 +685,7 @@ void cf_search_root_path(int root_index)
686685 // According to the documentation of dirname and basename, the return value does not need to be freed
687686 auto search_name = basename (basename_copy);
688687
689- auto parentDirP = unique_dir_ptr (opendir (directory_name. c_str () ));
688+ auto parentDirP = unique_dir_ptr (opendir (directory_name));
690689 if (parentDirP) {
691690 struct dirent *dir = nullptr ;
692691 while ((dir = readdir (parentDirP.get ())) != nullptr ) {
@@ -696,7 +695,7 @@ void cf_search_root_path(int root_index)
696695 }
697696
698697 SCP_string fn;
699- sprintf (fn, " %s/%s" , directory_name. c_str () , dir->d_name );
698+ sprintf (fn, " %s/%s" , directory_name, dir->d_name );
700699
701700 struct stat buf;
702701 if (stat (fn.c_str (), &buf) == -1 ) {
You can’t perform that action at this time.
0 commit comments