[ 
https://issues.apache.org/jira/browse/TIKA-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr resolved TIKA-4538.
-----------------------------------
      Assignee: Tilman Hausherr
    Resolution: Fixed

Thanks for the report and the PR!

> AZBlobFetcher always throws FileAlreadyExistsException
> ------------------------------------------------------
>
>                 Key: TIKA-4538
>                 URL: https://issues.apache.org/jira/browse/TIKA-4538
>             Project: Tika
>          Issue Type: Bug
>          Components: tika-pipes
>    Affects Versions: 3.2.3
>            Reporter: Matt Dutton
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 4.0.0, 3.3.0
>
>
> When hosting Tika on Windows, calling the /tika/* endpoints with 
> {{enableUnsecureFeatures=true}} and using AZBlobFetcher, the 
> {{AZBlobFetcher}} throws a {{FileAlreadyExistsException}} exception.
> The {{AZBlobFetcher}} uses {{TemporaryResources.createTempFile()}} which uses 
> {{java.nio.file.Files.createTempFile}} to create the temp file. This function 
> does not just generate a new, unique name but also creates the actual file.
> REF: [JavaDoc - 
> java.nio.file.Files.createTempFile(...)|https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#createTempFile-java.nio.file.Path-java.lang.String-java.lang.String-java.nio.file.attribute.FileAttribute...-]
> When {{AZBlobFetcher}} calls {{{}BlobClient.downloadToFile(string){}}}, it 
> throws an exception for the existing file.
> REF: [JavaDoc - 
> com.azure.storage.blob.specialized.BlobClientBase.downloadToFile(...)|https://javadoc.io/static/com.azure/azure-storage-blob/12.10.1/com/azure/storage/blob/specialized/BlobClientBase.html#downloadToFile-java.lang.String-]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to