pkolaczk / fclones

Efficient Duplicate File Finder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single quotes in input path names cause malformed header error

random-geek opened this issue · comments

A minimal reproducible example using PowerShell on Windows 10:

mkdir "test'dir"
./fclones group "test'dir" > dupes.txt
Get-Content dupes.txt | ./fclones remove

This script fails in the removal stage:

fclones.exe: error: Input error: Malformed header: Failed to parse command arguments: Unclosed single quote

The same thing happens if I pipe the output of fclones group directly to fclones remove. Here's the content of dupes.txt:

# Report by fclones 0.29.1
# Timestamp: [removed for privacy]
# Command: 'C:\Software\fclones-0.29.1\fclones.exe' group 'test\'dir'
# Base dir: C:\\Software\\fclones-0.29.1
# Total: 0 B (0 B) in 0 files in 0 groups
# Redundant: 0 B (0 B) in 0 files
# Missing: 0 B (0 B) in 0 files

If I change the third line to this:

# Command: 'C:\Software\fclones-0.29.1\fclones.exe' group "test'dir"

then fclones remove works fine.

BTW, thanks for this great little piece of software!

Confirmed, thank you for reporting.