Skip to content

Commit

Permalink
Fix source directory
Browse files Browse the repository at this point in the history
Use `os.path.join` to avoid bad construction of source directory.
  • Loading branch information
charlielito authored Jan 31, 2021
1 parent 8546cfd commit c2dd969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
currentdir = os.path.realpath(os.getcwd()).rstrip(os.sep)
print("Arguments: " + str(sys.argv))
# Get absolute source dir after removing leading and trailing seperators from input.
sourcedir = currentdir + sys.argv[1].lstrip(os.sep).rstrip(os.sep)
sourcedir = os.path.join(currentdir,sys.argv[1].lstrip(os.sep).rstrip(os.sep))
print("Source directory: " + sourcedir)
excludedirs = ()
if sys.argv[2]:
Expand Down

0 comments on commit c2dd969

Please sign in to comment.