Skip to content

Commit 79ef076

Browse files
-1
1 parent 4ce6a61 commit 79ef076

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xdcc/xdcc.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ func DCCSend(hook *webircgateway.HookIrcLine) {
208208

209209
//TODO when file has no extension PARTS file
210210
lastIndex := strings.LastIndex(parts.file,".")
211-
211+
if(lastIndex == -1){
212+
lastIndex = len(parts.file)
213+
}
212214

213215
parts.file = slug.Make(parts.receiverNick + strings.ReplaceAll(parts.serverHostname, ".", "_") + parts.senderNick + parts.file[0:lastIndex]) + parts.file[lastIndex:len(parts.file)] //long URLs may not work
214216

0 commit comments

Comments
 (0)