fs/FileInfo: make constructor `explicit`

This commit is contained in:
Max Kellermann 2023-10-07 12:24:02 +02:00
parent 51c0a03e94
commit f549c611ab
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class FileInfo {
public: public:
constexpr FileInfo() noexcept = default; constexpr FileInfo() noexcept = default;
FileInfo(Path path, bool follow_symlinks=true) { explicit FileInfo(Path path, bool follow_symlinks=true) {
if (!GetFileInfo(path, *this, follow_symlinks)) { if (!GetFileInfo(path, *this, follow_symlinks)) {
#ifdef _WIN32 #ifdef _WIN32
throw FmtLastError("Failed to access {}", path); throw FmtLastError("Failed to access {}", path);