From 0be08399a0451dfbce174de8d605e0c447ac17cc Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Tue, 2 Mar 2021 18:21:55 +0400 Subject: [PATCH] Fixed Win32 compiler errors related to paths. --- src/hz/data_file.h | 2 +- src/hz/fs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hz/data_file.h b/src/hz/data_file.h index cee2bb0..8615e8f 100644 --- a/src/hz/data_file.h +++ b/src/hz/data_file.h @@ -90,7 +90,7 @@ inline fs::path data_file_find(const std::string& domain, const std::string& fil if (fs::exists(file_path, ec)) { if (!allow_to_be_directory && fs::is_directory(file_path, ec)) { debug_print_error("app", "%s: Data file \"[%s:]%s\" file found at \"%s\", but it is a directory.\n", - DBG_FUNC, domain.c_str(), file_path.string().c_str(), dir.c_str()); + DBG_FUNC, domain.c_str(), file_path.string().c_str(), dir.string().c_str()); return fs::path(); } debug_print_info("app", "%s: Data file \"[%s:]%s\" found at \"%s\".\n", diff --git a/src/hz/fs.h b/src/hz/fs.h index e7e6d4c..4240165 100644 --- a/src/hz/fs.h +++ b/src/hz/fs.h @@ -473,7 +473,7 @@ inline bool fs_path_is_writable(const fs::path& path, std::error_code& ec) fs::path path_to_check = path; if (path_exists && is_directory) { path_to_check /= "__test.txt"; - path_exists = fs::exists(path_to_check.exists(), ignored_ec); + path_exists = fs::exists(path_to_check, ignored_ec); } // path_to_check either doesn't exist, or it's a file. try to open it.