Avoid useless './' in file paths
Replaced useless 'os.path.relpath(os.getcwd())' statement with 'os.curdir' (which is equal to '.'). Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user