run: properly generate automatic name when output is a directory and no -f specified

Fixed #720

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-05-21 12:38:21 +03:00
parent 91c16e2112
commit d15143bb6f
+1 -1
View File
@@ -43,6 +43,6 @@ class CmdRun(CmdBase):
def _stage_file_basename(fname):
result = os.path.basename(fname)
if len(result) == 0:
result = os.path.dirname(fname)
result = os.path.basename(os.path.dirname(fname))
result += Stage.STAGE_FILE_SUFFIX
return result