Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A selected directory has the identity of a file #3283

Open
akaenner opened this issue Jan 27, 2025 · 0 comments
Open

A selected directory has the identity of a file #3283

akaenner opened this issue Jan 27, 2025 · 0 comments

Comments

@akaenner
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  • Write an app which lets the user pick a folder by using UIDocumentPickerViewController
  • Connect the iOS Nextcloud app to a Nextcloud instance and make sure there is at least one folder in it.
  • Run your test app and pick a folder on the Nextcloud (file provider)
  • check if the picked item is a directory (by using FileManager.default.fileExists(atPath: pickedURL.path(percentEncoded: false), isDirectory: &isDirectory))

Expected behaviour

isDirectory.boolValue must be true

Actual behaviour

isDirectory.boolValue is false and it looks like it is a file containing data.
The content of the file is a string: "This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client."

po String(data: try! Data(contentsOf: pickedURL), encoding: .utf8)
▿ Optional

  • some : "This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client."

Reasoning or why should it be changed/implemented?

This looks like a bug

Environment data

iOS version: e.g. iOS 17.6.1
iPadOS 18.2.1 (22C164)

Nextcloud iOS app version: see More > Settings
6.2.4 (2) / latest version from Testflight at this time

Server operating system:

Web server: Apache, nginx

Database:

PHP version:

Nextcloud version: see Nextcloud admin page
30.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant