OCA / storage

GNU Affero General Public License v3.0
66 stars 148 forks source link

When directory_path is set the wrong protocol is used #311

Open simahawk opened 6 months ago

simahawk commented 6 months ago

If you set directory_path while using SFTP for instance, the fs object won't be the one of the protocol you've chosen. In storage_backend you can set a default root path for all type of storages.

It will automatically - and w/o notice - use RootedDirFileSystem. This leads to broken implementations because it will raise NotImplementedError when trying to use sftp api.

It would be nice to support this in the future. Meanwhile we should probably ignore that param and/or hide it or raise warning.

To reproduce:

  1. add an sftp storage
  2. set a directory_path
  3. try to move a file
  4. kaboom
github-actions[bot] commented 3 weeks ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.