[Csnd] WASM fs oddities
Date | 2024-11-21 00:23 |
From | Richard Knight |
Subject | [Csnd] WASM fs oddities |
I have observed a couple of strange behaviours in the fs functions of the latest WASM build (https://www.npmjs.com/package/@csound/browser) - assuming I'm using them right - does anyone know about these or have any suggestions on how to work around? // appearance of duplicate files when writing same path
for (var x = 0; x < 6; x++) csound.fs.writeFile("/test", new Uint8Array([99 + x])); console.log(await csound.fs.readdir("/")); // ["test", "test", "test", "test", "test", "test"] // unlink doesn't appear to work
let file = "/deleteme"; csound.fs.writeFile(file, new Uint8Array([0])); csound.fs.unlink(file); console.log(await csound.fs.readdir("/")); // ["deleteme"] |
Date | 2024-11-21 00:28 |
From | Richard Knight |
Subject | Re: [Csnd] WASM fs oddities |
I missed the awaits on the writeFile and unlink calls in the example - but it has the same result. On 2024-11-21 00:23, Richard Knight wrote:
|
Date | 2024-11-21 06:04 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] WASM fs oddities |
it sounds like you found a bug, the unlink is probably a rare use-case and I may have missed out a bug when developing this fs module, please open a ticket so I don't forget about this On Thu, 21 Nov 2024 at 02:28, Richard Knight <richard@1bpm.net> wrote:
|
Date | 2024-11-21 14:41 |
From | Richard Knight |
Subject | Re: [Csnd] WASM fs oddities |
OK, thanks - does the ticket need to go on the main csound/csound repository or somewhere else? On 2024-11-21 06:04, Hlöðver Sigurðsson wrote:
|