diff --git a/whipper/command/cd.py b/whipper/command/cd.py index 68b6d42..87060e2 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -280,7 +280,7 @@ Log files will log the path to tracks relative to this directory. "supports this feature. ") self.parser.add_argument('-O', '--output-directory', action="store", dest="output_directory", - default=os.path.relpath(os.getcwd()), + default=os.curdir, help="output directory; will be included " "in file paths in log") self.parser.add_argument('-W', '--working-directory', diff --git a/whipper/common/program.py b/whipper/common/program.py index 2ee4146..6f6102b 100644 --- a/whipper/common/program.py +++ b/whipper/common/program.py @@ -239,6 +239,8 @@ class Program: # Avoid filtering non str type values, replace None with empty string v_fltr = {k: self._filter.filter(v2) if isinstance(v2, str) else '' if v2 is None else v2 for k, v2 in v.items()} + if outdir == os.curdir: + return template % v_fltr # Avoid useless './' in file paths return os.path.join(outdir, template % v_fltr) @staticmethod