[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix add_c_file.py script to support paths starting with ./ #31336
commit 619178bb3a0005af4b1f44ff58aded4202388597
Author: Daniel Pinto <danielpinto52@xxxxxxxxx>
Date: Mon Sep 16 22:28:33 2019 +0100
Fix add_c_file.py script to support paths starting with ./ #31336
---
changes/ticket31336 | 3 +++
scripts/maint/add_c_file.py | 4 +---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/changes/ticket31336 b/changes/ticket31336
new file mode 100644
index 000000000..c5a013699
--- /dev/null
+++ b/changes/ticket31336
@@ -0,0 +1,3 @@
+ o Minor bugfixes (developer tools):
+ - Allow paths starting with ./ in scripts/add_c_file.py. Fixes bug
+ 31336; bugfix on 0.4.1.2-alpha.
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index adf7ce79b..a773fd0ff 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'.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits