From 619178bb3a0005af4b1f44ff58aded4202388597 Mon Sep 17 00:00:00 2001 From: Daniel Pinto Date: Mon, 16 Sep 2019 22:28:33 +0100 Subject: Fix add_c_file.py script to support paths starting with ./ #31336 --- scripts/maint/add_c_file.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/maint') 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'. -- cgit v1.2.3-54-g00ecf