diff options
| author | 2022-02-17 12:40:28 +0100 | |
|---|---|---|
| committer | 2022-02-19 00:37:43 +0000 | |
| commit | 1a1dc8cb166c0e01ac070e3fff0b4e18f64f5a11 (patch) | |
| tree | 3969bd4a2f6ebd068b7489b3ab2ebd20970d11ee /mini-dinstall | |
| parent | af3bff6382fe4c1ca97e1f8ce1a93ed37308e387 (diff) | |
mini-dinstall: Ensure that the top-level directory is an absolute path
Using relative paths for `archivedir` is possible, but could lead to
hard-to-debug failures depenring on `$PWD`.
Address this by turning the path to the top-level directory of the
archive into an absolute path.
Diffstat (limited to 'mini-dinstall')
| -rwxr-xr-x | mini-dinstall | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mini-dinstall b/mini-dinstall index 218365c..3e0072a 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -249,6 +249,7 @@ elif configp.has_option('DEFAULT', 'archivedir'): else: logger.error("No archivedir specified on command line or in config files.") sys.exit(1) +toplevel_directory = os.path.abspath(toplevel_directory) if configp.has_option('DEFAULT', 'incoming_permissions'): incoming_permissions = int(configp.get('DEFAULT', 'incoming_permissions'), 8) |
