9001 / 9001/copyparty

`sel`-ecting a deleted file in `up2k` leads to the crash page

オープン 初心者向け
#1,516 コメント 2 件 リアクション 0 件 担当者 1 名 @9001 が担当を希望しています GitHub で見る
bug
主要言語
Python
スター
46.7k
フォーク
1.9k
平均マージ
9日 2時間
マージ済み PR(30日)
4

説明

### Describe the bug
In `up2k` mode, you can view a file by visiting a URL that looks as follows `http:////?doc=.#`. If you have the necessary rights, you can delete it by clicking the `sel` button and then clicking `del` on the panel at the bottom right corner. After confirming the deletion, a user is not redirected anywhere and instead remains on the file view (which is already deleted). By pressing `sel` again, the crash page appears.

### To Reproduce
1. Go to `up2k` page;
2. Upload a file, in my case it's `.txt`;
3. View the file contents by visiting `http:////?doc=.#`;
4. Press `sel`;
5. Press `del`;
6. Confirm deletion;
7. Press `sel` again.

### Expected behavior
After the deletion, a user is redirected elsewhere from the deleted file view.

### Screenshots

Image

### Server details (if you're NOT using docker/podman)
remove the ones that are not relevant:
* **what copyparty did you grab:** sfx
* **how you're running it:** in a terminal
* run copyparty with `--version` and grab the last 3 lines (they start with `copyparty`, `CPython`, `sqlite`) and paste them below this line:

```
copyparty v1.20.16 "sftp is fine too" (2026-05-26)
CPython v3.13.12 on Linux64 [GCC 15.2.0]
sqlite 3.46.1*1 | jinja 3.1.6 | pyftpd 1.5.10 | tftp 0.4.0 | miko 4.0.0
```

* **copyparty arguments and/or config-file:**

```bash
python copyparty-sfx.py -a admin:admin -a writer:w --sftp 3922 --sftp-pw -v /home/alt/tmp/copyparty/cp-sftp-wo:v:w,writer:A.,admin
```

> I assume sftp options are redundant here, but keeping it as-is

### Server log
No new logs show up after the second click on `sel` which leads to crash, but latest deletion logs are as follows:

```
23:23:59.012 127.0.0.1 35360 POST /v/ @admin
23:24:00.444 127.0.0.1 35360 GET /v/candidate-names.txt @admin
23:24:00.444 127.0.0.1 35360 /v/candidate-names.txt plain 304
23:24:03.873 127.0.0.1 35360 POST /v/candidate-names.txt?delete @admin
23:24:03.873 up2k rm 'v/candidate-names.txt'
'/home/alt/tmp/copyparty/cp-sftp-wo/candidate-names.txt'
23:24:03.873 up2k forgetting 'candidate-names.txt'
23:24:03.873 127.0.0.1 35360 deleted 1 files (and 0/0 folders)
23:24:03.879 127.0.0.1 35360 GET /v/?tree=&dots @admin
23:24:03.879 127.0.0.1 35370 GET /v/?ls&dots&rtt=6 @admin
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

このバグは、ファイルを削除した後の up2k file manager UI で発生します。'sel' button と deletion flow を処理している JavaScript を見てください。おそらく frontend code にあります。削除後に UI がどのように更新されるか、redirect がトリガーされるかどうかを確認してください。server logs では削除が成功していることが示されているので、delete POST request に対する client-side response と、その後の UI state に集中してください。

索引モデルが issue の本文から書いたものです。

評価

領域
backend, frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。