summaryrefslogtreecommitdiff
path: root/docs/esp8266/tutorial/nextsteps.rst
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2022-09-09 09:48:01 +1000
committerDamien George <damien@micropython.org>2022-09-13 13:00:42 +1000
commit4e0964b59f44b25ebaa5239f9ea4273b804ebe64 (patch)
tree49544e05be338229e5c9a94d609c572c1c1bf5cf /docs/esp8266/tutorial/nextsteps.rst
parent582b3e4e7864809e30eac694251600f61db52a3c (diff)
extmod/vfs: Add finaliser to ilistdir to close directory handle.
When iterating over filesystem/folders with os.iterdir(), an open file (directory) handle is used internally. Currently this file handle is only closed once the iterator is completely drained, eg. once all entries have been looped over / converted into list etc. If a program opens an iterdir but does not loop over it, or starts to loop over the iterator but breaks out of the loop, then the handle never gets closed. In this state, when the iter object is cleaned up by the garbage collector this open handle can cause corruption of the filesystem. Fixes issues #6568 and #8506.
Diffstat (limited to 'docs/esp8266/tutorial/nextsteps.rst')
0 files changed, 0 insertions, 0 deletions