Bug 474950 - Downloading file with prefixed tab in name via File Picker causes multiple file section error.
Summary: Downloading file with prefixed tab in name via File Picker causes multiple fi...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.08.1
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-27 20:26 UTC by Roke Julian Lockhart Beedell
Modified: 2023-10-26 02:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
File Picker (54.38 KB, image/png)
2023-09-27 20:29 UTC, Roke Julian Lockhart Beedell
Details
Error message (22.18 KB, image/png)
2023-09-27 20:29 UTC, Roke Julian Lockhart Beedell
Details
Workaround automatically applied using Save As on a file with such a name. (170.39 KB, image/png)
2023-10-26 02:13 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2023-09-27 20:26:53 UTC
SUMMARY

Downloading a file with the name

```txt
	`{id: ""}`{.json5}.txt.pdf
```

to the path `/run/media/RokeJulianLockhart/s11vzd/	`{title: "Entities",	id: "s1ev31"}`{.json5}.dir/	`{name: {short: "Beedell.RokeJulianLockhart",	long: {third: "Beedell",	first: "Roke"}},	id: "s1ev2l"}`{.json5}.dir/	`{title: "Legal",	id: ""}`{.json5}.dir/	`{title: "Your_OIN_License_Agreement",	id: ""}`{.json5}.dir/` fails with the error

> Select only one file

STEPS TO REPRODUCE

0.  Initiate a file download which opens a file picker. Try saving a page using Firefox.
0.  Name it
    ```
    	`{id: ""}`{.json5}.txt.pdf
    ```
0.  Press "Save".

OBSERVED RESULT

It fails with the error

> Select only one file

EXPECTED RESULT

It should be saved without issue with the name chosen.

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20230922
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.4-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700
Manufacturer: ASRock
Product Name: X670E Taichi

ADDITIONAL INFORMATION

It can be worked around by simply renaming the file after it has been saved, but this is certainly not ideal.
Comment 1 Roke Julian Lockhart Beedell 2023-09-27 20:27:53 UTC
(In reply to third="Beedell", first="Roke", second="Julian Lockhart" from comment #0)
> SUMMARY
> 
> Downloading a file with the name
> 
> ```txt
> 	`{id: ""}`{.json5}.txt.pdf
> ```
> 
> to the path `/run/media/RokeJulianLockhart/s11vzd/	`{title: "Entities",	id:
> "s1ev31"}`{.json5}.dir/	`{name: {short: "Beedell.RokeJulianLockhart",	long:
> {third: "Beedell",	first: "Roke"}},	id: "s1ev2l"}`{.json5}.dir/	`{title:
> "Legal",	id: ""}`{.json5}.dir/	`{title: "Your_OIN_License_Agreement",	id:
> ""}`{.json5}.dir/` fails with the error
> 
> > Select only one file
> 
> STEPS TO REPRODUCE
> 
> 0.  Initiate a file download which opens a file picker. Try saving a page
> using Firefox.
> 0.  Name it
>     ```
>     	`{id: ""}`{.json5}.txt.pdf
>     ```
> 0.  Press "Save".
> 
> OBSERVED RESULT
> 
> It fails with the error
> 
> > Select only one file
> 
> EXPECTED RESULT
> 
> It should be saved without issue with the name chosen.
> 
> SOFTWARE/OS VERSIONS
> 
> Operating System: openSUSE Tumbleweed 20230922
> KDE Plasma Version: 5.27.8
> KDE Frameworks Version: 5.110.0
> Qt Version: 5.15.10
> Kernel Version: 6.5.4-1-default (64-bit)
> Graphics Platform: X11
> Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
> Memory: 30.5 GiB of RAM
> Graphics Processor: AMD Radeon RX 5700
> Manufacturer: ASRock
> Product Name: X670E Taichi
> 
> ADDITIONAL INFORMATION
> 
> It can be worked around by simply renaming the file after it has been saved,
> but this is certainly not ideal.

I keep forgetting that this Bugzilla instance is too old to use Markdown. It'll be more readable if you quickly copy it into Kate.
Comment 2 Roke Julian Lockhart Beedell 2023-09-27 20:29:15 UTC
Created attachment 161918 [details]
File Picker
Comment 3 Roke Julian Lockhart Beedell 2023-09-27 20:29:29 UTC
Created attachment 161919 [details]
Error message
Comment 4 fanzhuyifan 2023-10-25 15:50:20 UTC
Humm I am failing to reproduce the bug. On my end saving to
```txt
	`{id: ""}`{.json5}.txt.pdf
```
always works, with both firefox and firefox-nightly, using the dolphin file picker (with `GTK_USE_PORTAL=1`).

On your end, could you verify if the name of the parent directories matter? Or does saving to this particular filename always fail regardless of whether the parent directories have well behaved names?
Comment 5 Roke Julian Lockhart Beedell 2023-10-26 02:11:33 UTC
(In reply to fanzhuyifan from comment #4)
> Humm I am failing to reproduce the bug. On my end saving to
> ```txt
> 	`{id: ""}`{.json5}.txt.pdf
> ```
> always works, with both firefox and firefox-nightly, using the dolphin file
> picker (with `GTK_USE_PORTAL=1`).
> 
> On your end, could you verify if the name of the parent directories matter?
> Or does saving to this particular filename always fail regardless of whether
> the parent directories have well behaved names?

The parent directory name is irrelevant.
Comment 6 Roke Julian Lockhart Beedell 2023-10-26 02:13:49 UTC
Created attachment 162571 [details]
Workaround automatically applied using Save As on a file with such a name.

Although this doesn't fix the issue, this depicts a temporary workaround used automatically by the File Picker when using Save As on an existent open file with relevant UTF-8 characters in its name (since obviously someone encountered this exact bug at some point in the past but didn't fix it entirely).

This isn't a fix because it requires prior knowledge of how to escape such characters, which isn't a skill we should expect of most users, and doesn't appear to be documented.