nextcloud / nextcloud/server

`occ files:scan` misinterprets wrong path as username

Open
#27,031 5 comments 1 reaction 1 assignee View on GitHub

@joshtrichards is already working on this.

Since Nov 20, 2024.

25-feedback 3. to review bug feature: occ good first issue papercut
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. occ files:scan -p "/a" -- user
{"reqId":"E1ZbwC00u05pcPknr1Ws","level":1,"time":"2021-05-19T10:15:35+00:00","remoteAddr":"","user":"--","app":"admin_audit","method":"","url":"--","message":"Console command executed: files:scan -p /a -- user","userAgent":"--","version":"19.0.8.1"}
Unknown user 1 a
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+
Expected behaviour

An error message "Path '/a' does not exist or is inaccessible" (or something similar) should be issued. Exit code should be non-zero (see #27029 as well).
The "1" before the username is wrong anyway, also when issuing other parameters that work.

Server configuration

Nextcloud version:
19.0.8.1

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.