Skip to content

Commit

Permalink
fix: Convert files with .mbm extension (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmorley authored Dec 11, 2024
1 parent 117c76e commit 943b227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Reconnect/Model/TransfersModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class TransfersModel {
// reasonable point to hook an initial implementation.
var urls: [URL] = [downloadURL]
if convertFiles {
if directoryEntry.fileType == .mbm {
if directoryEntry.fileType == .mbm || directoryEntry.pathExtension.lowercased() == "mbm" {
urls = try PsiLuaEnv().convertMultiBitmap(at: downloadURL, removeSource: true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ extension FileServer.DirectoryEntry {
}
}
}

public var pathExtension: String {
return (self.name as NSString).pathExtension
}

}

0 comments on commit 943b227

Please sign in to comment.