CC: Tweaked

CC: Tweaked

42M Downloads

Filesystem not updating space quota properly when using an external editor.

fatboychummy opened this issue ยท 1 comments

commented

Minecraft Version

1.16.x

Version

1.97.0

Details

Summary

When using an external editor to delete the contents of a file, the "free space" quota does not update.

Reproduction:

  1. Make a large file, large enough that it's noticeable when using fs.getFreeSpace("")
  2. Open the file in an external editor
  3. Do not delete the file, instead use ctrl+a to select all the text in the file, hit backspace, then save.
  4. Call fs.getFreeSpace(""), notice the space has not been freed.

Extra information

  • When you do this, even if you delete the file afterwards the space is not freed until the server restarts.
  • fs/io writes fail if the system is "full" due to this, even if space is definitely available.
commented

This is more difficult to fix than is worth it (we'd have to set up file system watching, which is very awkward to do, and more difficult than is worth it). If you're hitting this issue, just reboot the computer.