Fixed --root option under Windows

This commit is contained in:
Johan Dahlberg 2018-04-13 10:50:27 +02:00
parent 9012f893a1
commit bdf4cfe0d8

2
cpplint/cpplint.py vendored
View File

@ -1860,7 +1860,7 @@ def GetHeaderGuardCPPVariable(filename):
# --root=.. , will prepend the outer directory to the header guard # --root=.. , will prepend the outer directory to the header guard
full_path = fileinfo.FullName() full_path = fileinfo.FullName()
root_abspath = os.path.abspath(_root) root_abspath = os.path.abspath(_root).replace('\\', '/')
maybe_path = StripListPrefix(PathSplitToList(full_path), maybe_path = StripListPrefix(PathSplitToList(full_path),
PathSplitToList(root_abspath)) PathSplitToList(root_abspath))