discard fs::canonical return

Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
This commit is contained in:
Duc Canh Le 2024-01-08 03:40:48 +00:00
parent 85b4d6c838
commit 149de9aa93

View File

@ -115,10 +115,10 @@ void listFilesWithRegexpMatchingImpl(
{ {
try try
{ {
/// We use fs::canonical to check if the file exists but the result path /// We use fs::canonical to resolve the canonical path and check if the file does exists
/// will be fs::absolute. /// but the result path will be fs::absolute.
/// Otherwise it will not allow to work with symlinks in `user_files_path` directory. /// Otherwise it will not allow to work with symlinks in `user_files_path` directory.
fs::path canonical_path = fs::canonical(path_for_ls + for_match); fs::canonical(path_for_ls + for_match);
fs::path absolute_path = fs::absolute(path_for_ls + for_match); fs::path absolute_path = fs::absolute(path_for_ls + for_match);
result.push_back(absolute_path.string()); result.push_back(absolute_path.string());
} }