Skip to content

Commit

Permalink
(refactor) improve dash_escape readability
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpaceSheep committed Apr 26, 2024
1 parent c7a1422 commit 7216d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moviepy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ def dash_escape(path):
>>> dash_escape('/absolute/path/to/-file.mp4')
'/absolute/path/to/-file.mp4'
"""
return "./" * (path[0] == "-") + path
return "./" + path if path.startswith("-") else path

0 comments on commit 7216d6e

Please sign in to comment.