Skip to content

Commit

Permalink
keep file_name if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed May 9, 2024
1 parent eda8180 commit 33a4b37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dvuploader/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def extract_file_name_hash_file(self):
self.directory_label = os.path.dirname(self.filepath)
self.handler.seek(0)

self.file_name = os.path.basename(self.filepath)
if self.file_name is None:
self.file_name = os.path.basename(self.filepath)

self.checksum = Checksum.from_file(
handler=self.handler,
hash_fun=hash_fun,
Expand Down

0 comments on commit 33a4b37

Please sign in to comment.