nextcloud / nextcloud/ios

A selected directory has the identity of a file

Open
#3,283 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with UIDocumentPickerViewController and FileManager using a Nextcloud folder, following the steps in the report. Start by locating the iOS app's file-provider handling; done means a picked Nextcloud directory is reported with isDirectory=true instead of appearing as a file containing the WebDAV response.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.