get-got / discord-downloader-go

A Discord bot program to download and otherwise handle files sent in Discord channels with extensive configuration. Can be used as a genuine Discord Bot or user account / self-bot
MIT License
271 stars 30 forks source link

Error about mkdir collision when destination folder already exists. #114

Closed kauffy closed 7 months ago

kauffy commented 7 months ago

When I launch DDG now, I get a continually recurring error like the one below. Its complaint is that the destination folder already exists-- but this shouldn't be an error condition. Obviously, it should just ignore this fact and proceed as if it had created it. Error while creating subfolder "D:\Workspace_Safe\Discord\Midjourney\Text Channels glass\images\": mkdir D:\Workspace_Safe\Discord\Midjourney\Text Channels glass\images\: Cannot create a file when that file already exists.

kauffy commented 7 months ago

This issue only occurs when the existing directory is actually a shortcut-- it appears to mistake it for a file, and say it can't mkdir, instead of recognizing it as the correct directory.

get-got commented 7 months ago

Thank you, I had started a reply the other day that I didn't end up finishing, I was very confused how you could be getting that error since logically that wouldn't make sense with this:

image

But it being a shortcut makes a whole lot more sense. I'll make note of this and see if I can account for shortcuts soon. I'll reply here when I do.

kauffy commented 7 months ago

It's probably very much an edge case.