diff --git a/src/fs/FileInfo.hxx b/src/fs/FileInfo.hxx index 9855f0ce4..86adaa78c 100644 --- a/src/fs/FileInfo.hxx +++ b/src/fs/FileInfo.hxx @@ -22,7 +22,6 @@ #include "check.h" #include "Path.hxx" -#include "util/Error.hxx" #include "system/Error.hxx" #include @@ -53,8 +52,6 @@ FileTimeToTimeT(FILETIME ft) class FileInfo { friend bool GetFileInfo(Path path, FileInfo &info, bool follow_symlinks); - friend bool GetFileInfo(Path path, FileInfo &info, - Error &error); friend class FileReader; #ifdef WIN32 @@ -145,27 +142,4 @@ GetFileInfo(Path path, FileInfo &info, bool follow_symlinks=true) #endif } -inline bool -GetFileInfo(Path path, FileInfo &info, bool follow_symlinks, Error &error) -{ - bool success = GetFileInfo(path, info, follow_symlinks); - if (!success) { - const auto path_utf8 = path.ToUTF8(); -#ifdef WIN32 - error.FormatLastError("Failed to access %s", - path_utf8.c_str()); -#else - error.FormatErrno("Failed to access %s", path_utf8.c_str()); -#endif - } - - return success; -} - -inline bool -GetFileInfo(Path path, FileInfo &info, Error &error) -{ - return GetFileInfo(path, info, true, error); -} - #endif