             
             for file in allFilesOfFolder
             {
-                let fileName = Tools.getName(from: file as! NSDictionary)
-                if (URL(fileURLWithPath: fileName as String).pathExtension == "realm") == false
+                let fileName = Tools.getName(from: file as! NSDictionary) as NSString
+                
+                if (fileName.pathExtension == "realm")
                 {
-                    continue
+                    let realmFile = RealmFile()
+                    realmFile.fileName = fileName as String
+                    realmFile.path = folderPath
+                    files.add(realmFile)
                 }
-                
-                // Skip if not a realm file
-                let realmFile = RealmFile()
-                realmFile.fileName = fileName as String
-                realmFile.path = folderPath as String
-                files.add(realmFile)
             }
         }
         return files

//----------------------------------------------------------------------------
class Realm: NSObject
{
    class func insertInstallerItem(for menu: NSMenu, withHotKey hotkey: NSNumber)
    {
        var item: NSMenuItem? = nil

        let files = NSMutableArray()
        for realmPath: String? in Constants.Realm.dbPaths
        {
            guard realmPath != nil else
            {
                break
            }
