Skip to content

Quote directory in util.diskUsage#13448

Merged
Frenzie merged 1 commit into
koreader:masterfrom
0xr0bert:master
Apr 9, 2025
Merged

Quote directory in util.diskUsage#13448
Frenzie merged 1 commit into
koreader:masterfrom
0xr0bert:master

Conversation

@0xr0bert

@0xr0bert 0xr0bert commented Mar 23, 2025

Copy link
Copy Markdown

If not quoted, this function does not work with directories that include a space in their name.

I noticed this when using calibre wirelessly. It reports the disk space as 1GB as this is the default if util.diskUsage doesn't work. Adding quotes around the directory fixes it on my Kobo Libra Color.


This change is Reviewable

Comment thread frontend/util.lua Outdated
@benoit-pierre

Copy link
Copy Markdown
Member

Wouldn't it be better to use util.shell_escape?

If not quoted, this function does not work with directories that include a space in their name
@0xr0bert

0xr0bert commented Apr 2, 2025

Copy link
Copy Markdown
Author

Wouldn't it be better to use util.shell_escape?

Have done this now.

@Frenzie Frenzie added this to the 2025.03 milestone Apr 2, 2025
@Frenzie Frenzie merged commit edb8f29 into koreader:master Apr 9, 2025
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
If not quoted, this function does not work with directories that include a space in their name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants