mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
add_c_file: Improve tor source directory checks
Check that the script isn't in a tor build directory, by looking for a src/include.am file. Part of 32962.
This commit is contained in:
parent
eb336e23a6
commit
0418bc0cb2
1 changed files with 2 additions and 0 deletions
|
@ -265,6 +265,8 @@ def run(fname):
|
|||
# Make sure we're in the top-level tor directory,
|
||||
# which contains the src directory
|
||||
assert(os.path.isdir("src"))
|
||||
# And it looks like a tor/src directory
|
||||
assert(os.path.isfile("src/include.am"))
|
||||
|
||||
# Make the file name relative to the top-level tor directory
|
||||
tor_fname = tordir_file(fname)
|
||||
|
|
Loading…
Add table
Reference in a new issue