[IMP] fs_storage: use fs.info() to check for the marker file#334
[IMP] fs_storage: use fs.info() to check for the marker file#334OCA-git-bot merged 1 commit intoOCA:16.0from
Conversation
florian-dacosta
left a comment
There was a problem hiding this comment.
I have the same error for an SFTP server. ("The specified file is not a directory.")
And for another server, I have an rights error on the fs.touch. I did not have any issue with previous version (before #320) and this PR also solve it.
The exact error is : [Errno 13] User XXX has no view rights to [SFTP_PATH/.odoofs_storage_2.marker]
Of course, it is specific to the rights of this sftp server but I did never met issue with this sftp server before so I guess the touch method require a different right and should be avoided if possible.
|
/ocabot merge patch |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 929389d. Thanks a lot for contributing to OCA. ❤️ |
I'm facing an issue with #320 and a SFTP storage:
That's because of using
fs.ls()to check for the existing of the marker file, see here. The sftp implementation of that method does not (yet) support files: see here.I understand that there was a rationale behind that choice, here.
But I think it's actually fine to use
fs.info(), as underlying implementations override it with efficiency in mind:os.statFTP stat