fixed some download progress files named "download_c"

added a few eggs to the gitignore file
This commit is contained in:
isanae
2019-12-07 04:21:29 -05:00
parent 346fadda11
commit 014fe35728
2 changed files with 18 additions and 0 deletions
+3
View File
@@ -31,3 +31,6 @@ graph.png
Thumbs.db
graph.dot
graph.pdf
/eggs/requests
/eggs/colorama
/eggs/tqdm
+15
View File
@@ -48,6 +48,21 @@ class URLDownload(Retrieval):
self.__file_name = os.path.basename(urlparse(self.__url).path.rstrip("/"))
self.__file_path = os.path.join(config['paths']['download'], self.__file_name)
# when set_destination() is called, __file_name is changed to the
# given path, which is probably absolute
#
# because __name is in most cases None, __file_name is used in name(),
# which is also used for the progress file name by replacing spaces with
# underscores
#
# this creates a file like "download_c:\somewhere", which is then
# sanitized to "download_c"
#
# this remembers the original filename in __name so the progress file
# can use it
if self.__name is None:
self.__name = self.__file_name
@property
def name(self):
if self.__name is None: