[GitHub] [tika] PeterAlfredLee opened a new pull request #332: Fix can't del tmp file in windows

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] PeterAlfredLee opened a new pull request #332: Fix can't del tmp file in windows

GitBox

PeterAlfredLee opened a new pull request #332:
URL: https://github.com/apache/tika/pull/332


   TestCase `org.apache.tika.image.HeifParserTest.testSimple` failed in windows because `TemporaryResources.close()` sometimes fail to delete tmp file.
   
   We can make it `deleteOnExit` as it's only a temp file, as Windows will eventually delete them from time to time even through `deleteOnExit` failed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] THausherr commented on pull request #332: Fix can't del tmp file in windows

GitBox

THausherr commented on pull request #332:
URL: https://github.com/apache/tika/pull/332#issuecomment-660511155


   Isn't this moot?
   https://issues.apache.org/jira/browse/TIKA-3135


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] PeterAlfredLee commented on pull request #332: Fix can't del tmp file in windows

GitBox
In reply to this post by GitBox

PeterAlfredLee commented on pull request #332:
URL: https://github.com/apache/tika/pull/332#issuecomment-666331912


   Hi @THausherr , sorry for the late reply.
   I think the fix in [TIKA-3135](https://issues.apache.org/jira/browse/TIKA-3135) is trying to avoid occupying the file, therefore we can close it(mostly on Windows).
   My fix in this PR is trying to make the file deleteOnExit in exception handle, and they will be eventually deleted. Considering they are temp files, I think this fix is reasonable - we do not need to stop the process if exceptions are thrown when deleting temp files.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] THausherr commented on pull request #332: Fix can't del tmp file in windows

GitBox
In reply to this post by GitBox

THausherr commented on pull request #332:
URL: https://github.com/apache/tika/pull/332#issuecomment-666604910


   I agree that it shouldn't stop the process. Suggestion: output a log message, because the cause is usually a programming oversight, so that it can be reported and fixed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] THausherr edited a comment on pull request #332: Fix can't del tmp file in windows

GitBox
In reply to this post by GitBox

THausherr edited a comment on pull request #332:
URL: https://github.com/apache/tika/pull/332#issuecomment-666604910


   I agree that it shouldn't stop the process. Suggestion: also output a log message, because the cause is usually a programming oversight, so that it can be reported and fixed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [tika] PeterAlfredLee commented on pull request #332: Fix can't del tmp file in windows

GitBox
In reply to this post by GitBox

PeterAlfredLee commented on pull request #332:
URL: https://github.com/apache/tika/pull/332#issuecomment-667450631


   > Suggestion: also output a log message, because the cause is usually a programming oversight, so that it can be reported and fixed.
   
   Just pushed the logging part. :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]