Skip to content

Commit

Permalink
better method for getting file extension from string
Browse files Browse the repository at this point in the history
  • Loading branch information
quoid committed Dec 31, 2020
1 parent 6c164b4 commit 3df190f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/Userscripts Extension/Functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ func trashFile(_ filename: String) -> Bool {
guard
toggleFile(filename, "enable"),
updateExcludesAndMatches(filename, [], []),
let type = URL(string: filename)?.pathExtension,
let type = filename.components(separatedBy: ".").last,
getRequiredCode(filename, [], type),
let saveLocation = getSaveLocation()
else {
Expand Down

0 comments on commit 3df190f

Please sign in to comment.