Skip to content

Commit ec82cb1

Browse files
committed
Fix cmpilation errors
1 parent 33c1b78 commit ec82cb1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

code/cfile/cfilesystem.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
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

2827
struct 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) {

0 commit comments

Comments
 (0)