You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user attribute of the FSNode objects returned from files.listdir is not correct if the Nextcloud instance is hosted in a sub-path. It currently evaluates this based on a assumption that the nextcloud instance is hosted on / and doesn't accommodate for an extra / if hosted in a subpath.
For example, for a Nextcloud instance hosted under /nextcloud, the user of the file will be "files".
FYI - I'm here at the Nextcloud Contributors conference this week and would be happy to connect and submit a PR to fix this while I'm here.
Steps/Code to Reproduce
Assuming nextcloud is installed at /nextcloud.
print("\n".join([f"User: {f.user} Path: {f.full_path} - Size: {f.info.size}" for f in sorted(nc.files.listdir(depth=-1), key = lambda x: x.info.size,reverse = True) if not f.is_dir]))