fix: macOS folder permissions (#435)

This commit is contained in:
PartyDonut 2025-08-04 16:37:38 +02:00 committed by GitHub
parent 9daf1831d5
commit 23385d8e62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 80 additions and 42 deletions

View file

@ -265,6 +265,7 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
} }
Future<void> addSyncItem(BuildContext? context, ItemBaseModel item) async { Future<void> addSyncItem(BuildContext? context, ItemBaseModel item) async {
try {
if (context == null) return; if (context == null) return;
if (saveDirectory == null) { if (saveDirectory == null) {
@ -278,7 +279,8 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
} }
if (context.mounted) { if (context.mounted) {
fladderSnackbar(context, title: context.localized.syncAddItemForSyncing(item.detailedName(context) ?? "Unknown")); fladderSnackbar(context,
title: context.localized.syncAddItemForSyncing(item.detailedName(context) ?? "Unknown"));
} }
final newSync = switch (item) { final newSync = switch (item) {
EpisodeModel episode => await syncSeries(item.parentBaseModel, episode: episode), EpisodeModel episode => await syncSeries(item.parentBaseModel, episode: episode),
@ -295,6 +297,12 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
} }
return; return;
} catch (e) {
log('Error adding sync item: ${e.toString()}');
if (context?.mounted == true) {
fladderSnackbar(context!, title: context.localized.somethingWentWrong);
}
}
} }
void viewDatabase(BuildContext context) => void viewDatabase(BuildContext context) =>

View file

@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true return true
} }
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
} }

View file

@ -4,11 +4,23 @@
<dict> <dict>
<key>com.apple.security.app-sandbox</key> <key>com.apple.security.app-sandbox</key>
<true/> <true/>
<key>com.apple.security.assets.movies.read-write</key>
<true/>
<key>com.apple.security.assets.music.read-write</key>
<true/>
<key>com.apple.security.assets.pictures.read-write</key>
<true/>
<key>com.apple.security.cs.allow-jit</key> <key>com.apple.security.cs.allow-jit</key>
<true/> <true/>
<key>com.apple.security.network.server</key> <key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/> <true/>
<key>com.apple.security.network.client</key> <key>com.apple.security.network.client</key>
<true/> <true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict> </dict>
</plist> </plist>

View file

@ -4,7 +4,21 @@
<dict> <dict>
<key>com.apple.security.app-sandbox</key> <key>com.apple.security.app-sandbox</key>
<true/> <true/>
<key>com.apple.security.assets.movies.read-write</key>
<true/>
<key>com.apple.security.assets.music.read-write</key>
<true/>
<key>com.apple.security.assets.pictures.read-write</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key> <key>com.apple.security.network.client</key>
<true/> <true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
</dict> </dict>
</plist> </plist>