diff --git a/Reconnect/Model/TransfersModel.swift b/Reconnect/Model/TransfersModel.swift index 3142b75..5ab783c 100644 --- a/Reconnect/Model/TransfersModel.swift +++ b/Reconnect/Model/TransfersModel.swift @@ -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) } } diff --git a/ReconnectCore/Sources/ReconnectCore/Extensions/DirectoryEntry.swift b/ReconnectCore/Sources/ReconnectCore/Extensions/DirectoryEntry.swift index 73e9e5f..788d88a 100644 --- a/ReconnectCore/Sources/ReconnectCore/Extensions/DirectoryEntry.swift +++ b/ReconnectCore/Sources/ReconnectCore/Extensions/DirectoryEntry.swift @@ -48,5 +48,9 @@ extension FileServer.DirectoryEntry { } } } + + public var pathExtension: String { + return (self.name as NSString).pathExtension + } }