diff options
author | Daniel Pinto <danielpinto52@gmail.com> | 2019-09-16 22:28:33 +0100 |
---|---|---|
committer | Daniel Pinto <danielpinto52@gmail.com> | 2019-09-16 22:57:20 +0100 |
commit | 619178bb3a0005af4b1f44ff58aded4202388597 (patch) | |
tree | 3eaf0f88f6a2e8943cadcf7682af1e7b8edee45a /scripts/maint | |
parent | 68a0106bf32988e1e085bbeaf843d3525e154c95 (diff) | |
download | tor-619178bb3a0005af4b1f44ff58aded4202388597.tar.gz tor-619178bb3a0005af4b1f44ff58aded4202388597.zip |
Fix add_c_file.py script to support paths starting with ./ #31336
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/add_c_file.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py index adf7ce79bb..a773fd0fff 100755 --- a/scripts/maint/add_c_file.py +++ b/scripts/maint/add_c_file.py @@ -15,9 +15,7 @@ import time def topdir_file(name): """Strip opening "src" from a filename""" - if name.startswith("src/"): - name = name[4:] - return name + return os.path.relpath(name, './src') def guard_macro(name): """Return the guard macro that should be used for the header file 'name'. |