aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Warta <simon@kullo.net>2017-01-03 19:41:18 +0100
committerSimon Warta <simon@kullo.net>2017-01-03 21:38:18 +0100
commit7e6ea3f3ddc3b686147ab01670e7ac83f29087aa (patch)
tree7e3e878f20fef6da4dfe0877bbe7d4028e60ab8b
parent6bb23a9d7ee23e9d0496bd00a2c7d6e5028ae2ed (diff)
Rename filename -> file_path in portable_symlink()
The variable contains a relative path to the source file to be linked/copied, not only a name.
-rwxr-xr-xconfigure.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/configure.py b/configure.py
index 98fca3fe0..7b2a822d5 100755
--- a/configure.py
+++ b/configure.py
@@ -1800,19 +1800,19 @@ def choose_link_method(options):
"""
Copy or link the file, depending on what the platform offers
"""
-def portable_symlink(filename, target_dir, method):
+def portable_symlink(file_path, target_dir, method):
- if not os.access(filename, os.R_OK):
- logging.warning('Missing file %s' % (filename))
+ if not os.access(file_path, os.R_OK):
+ logging.warning('Missing file %s' % (file_path))
return
if method == 'symlink':
- rel_filename = os.path.relpath(filename, start=target_dir)
- os.symlink(rel_filename, os.path.join(target_dir, os.path.basename(filename)))
+ rel_file_path = os.path.relpath(file_path, start=target_dir)
+ os.symlink(rel_file_path, os.path.join(target_dir, os.path.basename(file_path)))
elif method == 'hardlink':
- os.link(filename, os.path.join(target_dir, os.path.basename(filename)))
+ os.link(file_path, os.path.join(target_dir, os.path.basename(file_path)))
elif method == 'copy':
- shutil.copy(filename, target_dir)
+ shutil.copy(file_path, target_dir)
else:
raise Exception('Unknown link method %s' % (method))