 
 }
 
-extension Library /* Preferences keys */ {
-
-    static let libraryFileDirectoryBookmarkPreferenceKey = "SSELibraryFileDirectoryBookmark"
-    static let libraryFileDirectoryAliasPreferenceKey = "SSELibraryFileDirectoryAlias"
-    static let libraryFileDirectoryPathPreferenceKey = "SSELibraryFileDirectoryPath"
+extension Library /* Defaults keys */ {
+
+    static let libraryFileDirectoryBookmarkDefaultsKey = "SSELibraryFileDirectoryBookmark"
+    static let libraryFileDirectoryAliasDefaultsKey = "SSELibraryFileDirectoryAlias"
+    static let libraryFileDirectoryPathDefaultsKey = "SSELibraryFileDirectoryPath"
 
 }
 

    }

    private var rememberedFileDirectoryPath: String? {
        if let bookmarkData = UserDefaults.standard.data(forKey: Self.libraryFileDirectoryBookmarkPreferenceKey) {
            return Alias(data: bookmarkData).path
        }
        else if let aliasData = UserDefaults.standard.data(forKey: Self.libraryFileDirectoryAliasPreferenceKey) {
            return Alias(aliasRecordData: aliasData)?.path
        }
        else {
            return UserDefaults.standard.string(forKey: Self.libraryFileDirectoryPathPreferenceKey)
        }
    }

    private func clearRememberedFileDirectoryPath() {
        let defaults = UserDefaults.standard
        defaults.removeObject(forKey: Self.libraryFileDirectoryBookmarkPreferenceKey)
        defaults.removeObject(forKey: Self.libraryFileDirectoryAliasPreferenceKey)
        defaults.removeObject(forKey: Self.libraryFileDirectoryPathPreferenceKey)
    }

    private var defaultFileDirectoryPath: String {

            let alias = Alias(path: newValue)!

            let defaults = UserDefaults.standard
            defaults.set(alias.data, forKey: Self.libraryFileDirectoryBookmarkDefaultsKey)
            // Clear anything that might have been in old libraryFileDirectoryAliasDefaultsKey.
            // If someone runs an old version of the app, let it fall back via the path.
            defaults.removeObject(forKey: Self.libraryFileDirectoryAliasDefaultsKey)
            defaults.set(newValue, forKey: Self.libraryFileDirectoryPathDefaultsKey)
        }
    }

