v0.2.4: stop export loop on Ctrl+C instead of flooding failures

- Add IsCancelled() to Bridge interface
- Check bridge.IsCancelled() before each export in serial/parallel/backupTree
- Parallel workers mark remaining slots as 'cancelled' instead of exporting
- Add photos_request_is_cancelled to ObjC and C stub
This commit is contained in:
Ein Anderssono
2026-06-11 21:44:55 +02:00
parent 009c71e6bb
commit 479c284dfc
9 changed files with 32 additions and 1 deletions
+2
View File
@@ -28,6 +28,8 @@ char *photos_list_tree_json(void);
void photos_request_cancel(void);
int photos_request_is_cancelled(void);
void photos_free_string(char *value);
#ifdef __cplusplus
+4
View File
@@ -415,3 +415,7 @@ void photos_free_string(char *value) {
void photos_request_cancel(void) {
photos_cancelled = 1;
}
int photos_request_is_cancelled(void) {
return photos_cancelled;
}
+4
View File
@@ -74,6 +74,10 @@ void photos_request_cancel(void) {
stub_cancelled = 1;
}
int photos_request_is_cancelled(void) {
return stub_cancelled;
}
void photos_test_set_export_preview_json(const char *json) {
stub_export_preview_json = json;
}