fs/FileInfo: make constructor explicit
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user