OpenListTeam / OpenListTeam/OpenList
[BUG] Teldrive driver: storage root lists all files flattened (empty path param sent to backend)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 24.7k
- Forks
- 2.3k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
Please confirm the following
-
I have read and agree to AGPL-3.0 Section 15 .
The program is provided "as is" without any warranties; you bear all risks of using it. -
I have read and agree to AGPL-3.0 Section 16 .
The copyright holders and distributors are not liable for any damages resulting from the use or inability to use the program. -
I confirm my description is clear, polite, helps developers quickly locate the issue, and complies with community rules.
-
I have read the OpenList documentation.
-
I confirm there are no duplicate issues or discussions.
-
I confirm this is an
OpenListissue, not caused by other reasons (such as network, dependencies, or operation). -
I believe this issue must be handled by
OpenListand not by a third party. -
I confirm this issue is not fixed in the latest version.
-
I have not read these checkboxes and therefore I just ticked them all, Please close this issue.
OpenList Version (required)
4.2.6
Storage Driver Used (required)
Teldrive
Bug Description (required)
Teldrive driver: listing the storage root shows the user's ENTIRE file tree flattened in one list instead of the root directory children. Subfolder navigation works correctly.
Root cause: for the storage root the driver sends GET /api/files without a "path" query param (root dir object GetPath() == ""). Teldrive v1.8.3 treats missing/empty path as "no path filter" and returns every user file. Teldrive's own UI always sends path=/ and shows the correct root.
Also: the "Root folder path" (root_folder_path) storage option has no effect for this driver — drivers/teldrive/driver.go never reads d.RootPath.
Suggested fix in drivers/teldrive/driver.go, List():
p := dir.GetPath()
if p == "" { p = "/" }
and use p in both first-page and pagination request params. Optionally honor d.RootPath.
Logs (required)
Direct API calls against Teldrive v1.8.3 (cookie masked):
$ curl -H "Cookie: access_token=" "https:///api/files?path=/&limit=500&page=1"
-> 2 items: oldDisk (folder), server_backups (folder) [correct root]
$ curl -H "Cookie: access_token=" "https:///api/files?limit=500&page=1"
-> 54 items: entire account tree flattened [what OpenList receives for the root]
$ curl -H "Cookie: access_token=" "https:///api/files?path=/oldDisk&limit=500&page=1"
-> 11 items (correct children; OpenList subfolder navigation works)
In OpenList: /api/fs/list with path "/" returns all 54 items; path "/teldrive/oldDisk" returns 11.
Configuration File Content (required)
{
"force": false,
"site_url": "",
"cdn": "",
"jwt_secret": "",
"token_expires_in": 48,
"database": { "type": "sqlite3", "db_file": "data/data.db", "table_prefix": "x_" },
"scheme": { "address": "0.0.0.0", "http_port": 5244 },
"temp_dir": "data/temp",
"log": { "enable": true, "name": "data/log/log.log" },
"auto_memory_limit": 4,
"max_concurrency": 64,
"s3": { "enable": false },
"ftp": { "enable": false },
"sftp": { "enable": false },
"mcp": { "enable": false },
"last_launched_version": "v4.2.6"
}
Reproduction Link (optional)
No response
AI Generated Content
- I used AI tools to generate this content
- I did not use AI tools to generate this content
AI model used
GLM 5.3 Flash
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in drivers/teldrive/driver.go, especially List(), and inspect how the path is placed in both first-page and pagination request parameters. Reproduce with /api/fs/list using path "/" and compare the Teldrive requests for "/" and a subfolder. Done means the root lists only its direct children, pagination remains correct, and subfolder navigation still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100