File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class FileWithDetails
5050 {
5151 mPath = std::move (path);
5252 mPathSimplified = Path::simplifyPath (mPath );
53- mPathAbsolute = Path::getAbsoluteFilePath ( mPath );
53+ mPathAbsolute . clear ( );
5454 }
5555
5656 const std::string& path () const
@@ -65,6 +65,9 @@ class FileWithDetails
6565
6666 const std::string& abspath () const
6767 {
68+ // use delayed resolution as it will fail for files which do not exist
69+ if (mPathAbsolute .empty ())
70+ mPathAbsolute = Path::getAbsoluteFilePath (mPath );
6871 return mPathAbsolute ;
6972 }
7073
@@ -95,7 +98,7 @@ class FileWithDetails
9598private:
9699 std::string mPath ;
97100 std::string mPathSimplified ;
98- std::string mPathAbsolute ;
101+ mutable std::string mPathAbsolute ;
99102 Standards::Language mLang = Standards::Language::None;
100103 std::size_t mSize ;
101104 std::size_t mFsFileId {0 };
You can’t perform that action at this time.
0 commit comments