Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.48k stars 682 forks source link

Exporter creates filenames that are invalid on Windows #1162

Closed maximumsomething closed 9 months ago

maximumsomething commented 9 months ago

Version

2.42.2

Flavor

CLI (Command-Line Interface)

Platform

Linux

Export format

HTML

Steps to reproduce

On Linux, export a channel with characters (such as ?) which are invalid in WIndows filenames. Copy the files over to an external drive supported by Windows, and attempt to open it in Windows. It will crash File Explorer.

I haven't tested if the Windows version is also affected by characters which are invalid in filenames.

Details

DiscordChatExporter is an archival tool. I'd expect it to create files which are as broadly compatible as possible, regardless of the operating system they're created on.

Checklist

Tyrrrz commented 9 months ago

This is expected. The paths are only verified to not contain invalid characters in the context of the current system. The exporter doesn't know where you expect to copy or use them in the future.

maximumsomething commented 9 months ago

This is an archival tool. It should not create archives that are unusable by certain operating systems, especially the most common desktop OS in the world. Also, if you mount the disk containing the archive in Windows, it might run chkdsk, which will delete the offending files, corrupting the archive! I was burned by this, which is the reason I filed this bug report in the first place.