9001 / 9001/copyparty

Charset handling issues with diacratics in created folder name

未关闭
#605 3 条评论 0 个 reaction 已指派 1 人 已被 @9001 认领 在 GitHub 查看
bug
主要语言
Python
星标
46.6k
派生
1.9k
平均合并
10 天 16 小时
30 天内合并 PR
5

描述

### Describe the bug
Creating a folder with diacratics from within Copyparty, and dragging a folder of the same name from your OS will create two different folders.

Here's how I realized it:

I was moving a lot of files from various disks to Copyparty, strictly through drag&drop via up2k, and I just realized that a folder is seemingly appearing twice.

Image

They have the same name. Clicking the second folder does show me being in the second folder in the sidebar, but as soon as I refresh (so, keep the same URL), copyparty puts me into the first one.

A regular `ls -l` shows both folders as being unique.
```
drwxr-xr-x 11 admin administrators 4096 2025-08-14 02:09 ZZ-Téléphones/
drwxr-xr-x 11 admin administrators 4096 2025-08-14 00:03 ZZ-Téléphones/
```

However, using `printf "%s\n" * | cat -vte` reveals that the "é" characters are printed differently:
```
[sora@lillie Photographie]$ printf "%s\n" * | cat -vte
ZZ-TeM-LM-^AleM-LM-^Aphones$
ZZ-TM-CM-)lM-CM-)phones$
```
one being `e` + `m-Lm-^A` to represent an é, coming from my drag & drop. the other being `M-CM-)` to represent that same character, coming from when I created the folder through Copyparty's UI.

### To Reproduce

https://github.com/user-attachments/assets/2a3cf1de-849a-46fa-901d-2b7acfe65e88

### Expected behavior
Copyparty notices the folder already exists / Sanitizes the incoming folder name to not encode diacratics in a different way.

### Server details
* **server OS / version:** Linux, QNAP QTS (NAS software)
* **how you're running copyparty:** Docker 5.10.60
* **docker image:** copyparty/ac, linux/amd64

### Client details
This is not particularly specific to my client, but just in case:
* the device type and model: MacBook Pro
* OS version: macOS Sequoia 15.6 (24G84)
* browser version: Safari 18.6 (20621.3.11.11.3)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。