Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
del: use findnext() to avoid leaks [fixes #84]
It appears findnext() needs to be called until the search is completed, and only in that case djgpp closes the findfirst handle. Call findnext() before removing the file to stay on a safe side. Perhaps glob() would be a better solution. Using only findfirst() was fine before LFNs were enabled, because the SFN's findfirst() doesn't need to close searches. But with LFNs this eventually overflows the buffer.
- Loading branch information
346193d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't dos delete respect wildcards since V3?
346193d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOS maybe, but not remove()/unlink().
For now I don't want to circumvent the
posix APIs in comcom32, and in this
particular case its not even worth a try.
346193d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansi/stdio/remove.c: