Skip to content

Commit

Permalink
Fixed --output with filename issue
Browse files Browse the repository at this point in the history
Fixed issue #52  with --output when providing a filename
  • Loading branch information
Erik Hendrix authored and Erik Hendrix committed Aug 7, 2019
1 parent ff25ca0 commit af94ba8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ Release Notes
- Fixed: When providing a folder as output it would be possible that the last folder name was stripped potentially resulting in error.
0.1.12:
- Fixed: Folders will now be deleted if there are 0-byte or corrupt video files within the folder `Issue #40 <https://github.com/ehendrix23/tesla_dashcam/issues/40>`_
- Fixed: Providing a filename for --output would create a folder instead and not setting resulting file to filename provided `Issue #52 <https://github.com/ehendrix23/tesla_dashcam/issues/52>`_
TODO
----
Expand Down
2 changes: 1 addition & 1 deletion tesla_dashcam/tesla_dashcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ def main() -> None:
# If no extension then assume it is a folder.
if os.path.splitext(args.output)[1] is not None:
target_folder, target_filename = os.path.split(args.output)
if target_filename is None:
if target_folder is None or target_folder == "":
# If nothing in target_filename then no folder was given,
# setting default movie folder
target_folder = movie_folder
Expand Down

0 comments on commit af94ba8

Please sign in to comment.