Skip to content

Commit

Permalink
Fix build error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed May 12, 2024
1 parent 87d9ccd commit b59584d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions filter/url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ std::vector <std::string> filter_url_scandir_internal (std::string folder)
folder = folder.substr(0, folder.size() - 1);
}
folder.append("\\*");
wstring wfolder = filter::strings::string2wstring(folder);
std::wstring wfolder = filter::strings::string2wstring(folder);
WIN32_FIND_DATA fdata;
HANDLE hFind = FindFirstFileW(wfolder.c_str(), &fdata);
if (hFind != INVALID_HANDLE_VALUE) {
do {
wstring wfilename(fdata.cFileName);
std::wstring wfilename(fdata.cFileName);
std::string name = filter::strings::wstring2string (wfilename);
if (name.substr(0, 1) != ".") {
files.push_back(name);
Expand Down Expand Up @@ -310,7 +310,7 @@ std::string filter_url_basename_web (std::string url)
void filter_url_unlink (std::string filename)
{
#ifdef HAVE_WINDOWS
wstring wfilename = filter::strings::string2wstring (filename);
std::wstring wfilename = filter::strings::string2wstring (filename);
_wunlink (wfilename.c_str ());
#else
unlink (filename.c_str ());
Expand Down Expand Up @@ -830,7 +830,7 @@ void filter_url_recursive_scandir (std::string folder, std::vector <std::string>
int filter_url_file_modification_time (std::string filename)
{
#ifdef HAVE_WINDOWS
wstring wfilename = filter::strings::string2wstring (filename);
std::wstring wfilename = filter::strings::string2wstring (filename);
struct _stat attributes;
_wstat (wfilename.c_str (), &attributes);
#else
Expand Down

0 comments on commit b59584d

Please sign in to comment.