alist/server/handles
okatu-loli e36c68e4db feat(api): add virtual_path field on fs/list and fs/get responses
The existing `path` field on ObjResp/ObjLabelResp returns whatever the
storage driver writes into model.Object.Path, and that contract has
quietly diverged across drivers:

- Local sets it to the physical disk path
  (e.g. `/data/data/com.termux/files/home/storage/download/foo.tar.gz`)
- Cloud drivers (Quark / Baidu / 115 / …) leave it empty
- Some other drivers fill it with their own internal id-like path

Clients that need the canonical alist virtual path (e.g. for `share`,
`fs/copy`, navigation) cannot rely on `path` alone. The frontend has
been working around this with branchy code such as
`pathJoin(getCurrentPath(), name)` in some places and
`obj.path` in others; one such mismatch caused a share regression on
Local mounts whose root_folder_path differs from the mount path
(visible as `failed get storage: storage not found; rawPath: ...`).

Add a `virtual_path` field that is always the alist virtual path for
the object:

- `toObjsResp`  -> `FixAndCleanPath(stdpath.Join(parent, obj.Name))`
- `FsGet`       -> `FixAndCleanPath(reqPath)`

`path` is left untouched for backwards compatibility. Clients should
prefer `virtual_path` for anything that talks to other alist APIs.
2026-05-29 10:33:43 +08:00
..
archive.go fix(fs): block path traversal in handlers 2026-01-30 16:06:51 +08:00
auth.go feat(auth): Add consistent error messaging for invalid login credentials 2026-02-10 16:46:57 +08:00
const.go feat(recursive-move): Advanced conflict policy for preventing unintentional overwriting (#7906) 2025-02-09 18:32:57 +08:00
down.go fix: enable GFM extension for markdown rendering in proxy mode 2026-04-05 12:17:41 -05:00
driver.go style: shorten name operations to op 2022-08-31 21:01:15 +08:00
fsbatch.go fix(rename): block rename for password-protected paths 2026-03-01 17:10:51 +08:00
fsmanage.go fix(rename): block rename for password-protected paths 2026-03-01 17:10:51 +08:00
fsread.go feat(api): add virtual_path field on fs/list and fs/get responses 2026-05-29 10:33:43 +08:00
fsup.go perf: optimize IO read/write usage (#8243) 2025-04-12 16:55:31 +08:00
helper.go fix: reflected XSS vulnerability plist api 2023-11-24 16:46:48 +08:00
index.go fix(search): BuildIndex concurrency error (#7035) 2024-08-22 00:44:55 +08:00
label_file_binding.go feat: add tag backup and fix bugs (#9265) 2025-08-15 23:09:00 +08:00
label.go feat: enhance permission control and label management (#9215) 2025-07-26 09:51:59 +08:00
lark.go feat(lark): add export tools API (#9511) 2026-05-15 16:47:26 +08:00
ldap_login.go fix(tls): harden defaults and warn on insecure mode 2026-01-30 15:36:52 +08:00
meta.go fix: some missing regexp lib modified 2024-01-01 18:44:59 +08:00
offline_download.go feat: add GuangYaPan offline download (#9505) 2026-05-15 16:53:35 +08:00
role.go feat: add user registration endpoint and role-based default settings (#9277) 2025-08-18 16:38:21 +08:00
search.go feat(search): Optimized search result filtering and paging logic (#9287) 2025-08-25 19:46:24 +08:00
session.go feat: implement session management (#9286) 2025-08-25 19:46:38 +08:00
setting.go feat(frp): add runtime log API and stop endpoint 2026-04-15 20:32:42 +08:00
share_page.go feat: add public share support 2026-03-19 11:37:25 +08:00
share_public.go fix: support all pagination mode (#9512) 2026-05-15 16:47:56 +08:00
share.go Fix share access accounting and validation 2026-03-30 10:00:03 +08:00
sshkey.go fix(sftp-server): postgre cannot store control characters (#8188 close #8186) 2025-03-27 23:14:36 +08:00
ssologin.go fix(ssologin): missing role in SSO auto-registration and minor callback issue (#9305) 2025-09-04 22:15:39 +08:00
storage.go feat: batch reload all storages (close #2762 pr #2775) 2022-12-21 19:21:18 +08:00
task.go feat(driver/s3): Add OSS Archive Support (#9350) 2025-10-16 17:22:54 +08:00
user.go feat(user): Enhanced role assignment logic (#9297) 2025-08-28 09:57:34 +08:00
webauthn.go fix(webauthn): handle error when removing webauthn credential (#7689) 2024-12-25 21:16:34 +08:00