agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
679 stars 56 forks source link

don't remove files that we've put in temporary directories #147

Closed intolerable closed 6 years ago

intolerable commented 6 years ago

Wai's temp file handler already does it (using ResourceT's cleanup). This is causing ResourceT to throw a ResourceClosedException (see below) because it's trying to remove a file that Spock has already removed. In older versions of ResourceT, the "No such file or directory" exception was silently dropped, but this bug has been fixed since version 1.1.11.1 and ResourceT now prints the exception once the request has been handled (after Spock cleans it up). This patch just deletes removeUploadedFiles since we don't need to worry about it on our end any more.

The exception:

ResourceCleanupException {rceOriginalException = Nothing, rceFirstCleanupException = /tmp/webenc24334-0.buf: removeLink: does not exist (No such file or directory), rceOtherCleanupExceptions = []}
agrafix commented 6 years ago

Great, thanks!