iTaybb / pySmartDL

A Smart Download Manager for Python
The Unlicense
198 stars 56 forks source link

Allow dest to refer to a filename relative to working directory #64

Open slycordinator opened 8 months ago

slycordinator commented 8 months ago

1) Allows user to set dest as merely a filename to be placed in the current directory

If self.dest is set, but lacks a directory portion, then sets self.dest to itself with the working directory ['.'+os.sep] appended to the front of it.

2) Made so only checks for / creates the output directory once.

Note: Without the change, if the the dest was a simply specified as a filename, the calls to os.makedirs(os.path.dirname(self.dest)) failed, because os.path.dirname(self.dest) evaluated to ''