Open dtheodor opened 3 years ago
@dtheodor is there a reason you can't just first delete the destination and then perform the rename? We'd like to stay on the safe side of things and not have renames be able to do overwrites.
Yes, the reason is that I want the overwrite to happen atomically. I am overwriting a directory, and my application depends on the directory always being there, I cannot afford it to be missing. An application-based workaround is practically impossible.
On further investigation this deficiency is also present in the REST API: although it advertises destination overwrite, it fails to do that with a similar error on 'legacy' mode, and it always moves the directory inside the already existing one on 'posix' mode. Maybe this is an issue that needs to be raised with the "server" team, but I have no way to contact them. These issues https://github.com/microsoft/AzureStorageExplorer/issues/1071 https://github.com/microsoft/AzureStorageExplorer/issues/2308 are related to this behavior.
@dtheodor
We can raise the issue with the platform team, and you can try raising this issue with Azure support, but it does sound like based on what you're saying that this request isn't possible right now.
You might need to rearchitect your application until the platform team can improve the API. =/
As stated in the ADLS Gen2 REST API, a create/rename operation can overwrite the existing file.
As far as I can tell, this is impossible to do with the storage explorer. Getting a
Failed to rename '<file>'. An object with the new name already exists.
Same error for files and directories. Running version 1.16.0.