Skip to content

Commit

Permalink
FIXED BUG
Browse files Browse the repository at this point in the history
I originally made this to work with image files, but I wasn't aware of how the MIME types were listed by the python-magic dependency, so I limited what it will check for. It will now only check for: "png", "jpg", jpeg, ogg, mp4, flac, rtf, html, pdf, tiff, and gif

These file types have all been tested, and they WILL work. I might try to test for and add more, at a later point.
  • Loading branch information
gsfordham authored Oct 13, 2018
1 parent e5a7770 commit de555d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def main():


#If the file types do not match
if extf != ftype:
if extf != ftype and \
ftype in ["png", "jpg", "jpeg", "ogg", "mp4",
"flac", "rtf", "html", "pdf", "tiff", "gif"]:
#Add back the period for the file type
final_type = ("." + ftype)
#Set the new name
Expand Down

0 comments on commit de555d8

Please sign in to comment.