zorael / kameloso

IRC bot with Twitch support
Boost Software License 1.0
9 stars 3 forks source link

Cannot connect to direct IPv6 addresses on Windows #106

Closed zorael closed 3 years ago

zorael commented 3 years ago

It tries to create a server directory containing colons, which Windows refuses.

std.file.FileException@std\file.d(3025): C:\Users\zorael\AppData\Roaming\kameloso\server\2001::f: The filename, directory name, or volume label syntax is incorrect.
----------------
0x000000014045ED18 in @safe bool std.file.cenforce!(bool).cenforce(bool, scope lazy const(char)[], immutable(char)[], ulong)
0x0000000140421E2F in @safe bool std.file.ensureDirExists!().ensureDirExists(scope const(char)[])
0x00000001403E2A51 in @safe void std.file.mkdirRecurse(scope const(char)[])
0x00000001402767E9 in kameloso.main.resolveResourceDirectory at C:\cygwin\home\zorael\src\kameloso\source\kameloso\main.d(2217)
0x000000014027B116 in kameloso.main.initBot at C:\cygwin\home\zorael\src\kameloso\source\kameloso\main.d(2717)
0x00000001402344BC in D main at C:\cygwin\home\zorael\src\kameloso\source\kameloso\entrypoint.d(97)
0x0000000140435893 in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll().__lambda1()
0x000000014043571C in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate())
0x00000001404357FB in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll()
0x000000014043571C in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate())
0x000000014043564E in d_run_main2
0x00000001403FF170 in d_run_main
0x0000000140234532 in kameloso.entrypoint._d_cmain!().main at C:\D\dmd2\windows\bin64\..\..\src\druntime\import\core\internal\entrypoint.d(29)
0x00000001404F1ECE in mainCRTStartup
0x00007FFB1F376FD4 in BaseThreadInitThunk
0x00007FFB1FF5CEC1 in RtlUserThreadStart

We need to escape the path.