nextcloud/server

`occ files:scan` misinterprets wrong path as username

Open

#27,031 创建于 2021年5月19日

在 GitHub 查看
 (5 评论) (1 反应) (1 负责人)PHP (4,865 fork)batch import
25-feedback3. to reviewbugfeature: occgood first issuepapercut

仓库指标

Star
 (34,953 star)
PR 合并指标
 (平均合并 20天) (30 天内合并 627 个 PR)

描述

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

贡献者指南