This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-24 16:20:29 -05:00
1 parent cb7154cedf
commit 5c4062c648
3 files changed
+74 -22

No files matched your search

+11
View File
@@ -305,6 +305,17 @@ self.onmessage = async (event) => {
break;
}
case 'fs:sync': {
// Re-read from IndexedDB into memory to pick up externally written files
(self.pyodide.FS as any).syncfs(true, (err: Error | null) => {
if (err) {
console.error('Error syncing from IndexedDB:', err);
}
self.postMessage({ id, type: 'fs:sync', success: !err });
});
break;
}
default:
console.warn('Unknown message type:', type);
}