Closed microbit-sam closed 5 years ago
Is FS_NEXT_AVAILABLE_CHUNK not being reset when the oversized file is removed
var FS_START_CHUNK = 0x01;
var FS_NEXT_AVAILABLE_CHUNK = FS_START_CHUNK;
function fsIncreaseChunkIndex(numberOfChunks) {
FS_NEXT_AVAILABLE_CHUNK += numberOfChunks;
var unusedMap = new MemoryMap();
// Check if we are over the filesystem area
if (chuckIndexAddress(unusedMap, FS_NEXT_AVAILABLE_CHUNK) >=
getEndAddress(unusedMap)) {
throw new Error('There is no more space in the file system.');
}
}
Yes, this was indeed an issue due to the temporary code with magic numbers and fake chunk discovery. This has been fixed in https://github.com/microbit-foundation/microbit-fs/commit/310a71df1899b7a4fb8172e5dba19644933d9845.
http://python-editor-parallax-filesystem-review.microbit.org.s3-eu-west-1.amazonaws.com/editor.html#
microbitFs
in consoleRefresh, and with the same program
microbitFs
in consoleFor both the only file in files should be
main.py