Skip to content

Commit

Permalink
Canonicalize input paths in source rewriter
Browse files Browse the repository at this point in the history
  • Loading branch information
randomPoison committed Dec 10, 2024
1 parent 564f95e commit 3ccaad1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/rewriter/SourceRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <clang/AST/PrettyPrinter.h>
#include <clang/Basic/SourceLocation.h>
#include <dirent.h>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <map>
Expand Down Expand Up @@ -1098,6 +1099,9 @@ int main(int argc, const char **argv) {
OutputDirectory = OutputDirectoryOption;
OutputPrefix = OutputPrefixOption;

RootDirectory = std::filesystem::canonical(RootDirectory);
OutputDirectory = std::filesystem::canonical(OutputDirectory);

RefactoringTool tool(options_parser.getCompilations(),
options_parser.getSourcePathList());

Expand Down

0 comments on commit 3ccaad1

Please sign in to comment.