Closed amake closed 4 years ago
thanks, good catch.. I wonder why I didn't stumble on that 🤔️
maybe readAsBytes
synchronously creates a file handle on that file (ie. open
), and only reads asynchronously?
did you do some other async action in the callback before reading?
did you do some other async action in the callback before reading?
Yes, the part in my FileReader
that actually reads the file is a separate async function because I need to detect the encoding if the file is not UTF-8.
Okay that makes perfect sense, at least now i don't have to rush another bug fix release for AuthPass 😅 should still be stable as long as I've got a file handle synchronously
I updated to the latest API changes and found that the
FileReader
is not awaited in thereadFile
method, so in my application the file was always deleted before it could be read.(By the way you were right, the changes were not as hard to deal with as I thought they would be.)