fix(foundry): copy playlists before deleting the unpacked archive
Archive import removed the temp folder before playlist tracks were read, so zip imports with music failed. The dialog hint now names .zip / .fvtt instead of .world. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,6 +67,15 @@ void test('zipStore: closeOpenProject is serialized with open on projectSwitchCh
|
||||
assert.match(src, /Открытие проекта отменено/);
|
||||
});
|
||||
|
||||
void test('zipStore: Foundry archive playlists are copied before temp unzip cleanup', () => {
|
||||
const src = fs.readFileSync(path.join(here, 'zipStore.ts'), 'utf8');
|
||||
const fn = src.slice(src.indexOf('async importProjectFromFoundry'));
|
||||
const body = fn.slice(0, fn.indexOf('\n async exportProjectZipToPath'));
|
||||
const copyAt = body.indexOf('await importPlaylists(pendingAppPlaylists)');
|
||||
const cleanupAt = body.indexOf('await loaded.cleanup()');
|
||||
assert.ok(copyAt > 0 && cleanupAt > copyAt);
|
||||
});
|
||||
|
||||
void test('zipStore: exportProjectZipToPath flushes saveNow for currently open project', () => {
|
||||
const src = fs.readFileSync(path.join(here, 'zipStore.ts'), 'utf8');
|
||||
assert.match(src, /async exportProjectZipToPath/);
|
||||
|
||||
Reference in New Issue
Block a user