Files
RememBerBerandCursor c126d83640 fix(next-macos-native): quick-note full-doc replace and Java migration hint
Honor collapsed caret when the editor is first responder; only fall back to persisted selection after focus leaves the panel. Surface ~/.MooTool SQLite detection in migration settings and align vault/Git docs with 0.8 behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 08:27:12 +08:00

21 lines
770 B
Swift

import Foundation
/// Default Java desktop edition data root (`~/.MooTool`), used for migration hints only.
public enum LegacyJavaDataPaths {
public static var defaultDirectory: URL {
FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".MooTool", isDirectory: true)
}
public static func legacyDatabaseURL(in root: URL = defaultDirectory) -> URL? {
let candidates = [
root.appendingPathComponent("MooTool.db"),
root.appendingPathComponent("database/MooTool.db")
]
return candidates.first { FileManager.default.fileExists(atPath: $0.path) }
}
public static func hasLegacyInstall(at root: URL = defaultDirectory) -> Bool {
legacyDatabaseURL(in: root) != nil
}
}