No, dir "a" is being created. Intact, I was testing out big list of naughty strings, I didn't have problem with any string but this one.
Regarding error, I don't mean error is "linked picture", I mean, for error one can look at the picture which I have linked. On Friday, October 16, 2020 at 8:00:03 AM UTC+5:30 Kurtis Rader wrote: > Works for me. Of course the actual error you're seeing is "The system > cannot find the path specified", not "Linked picture". You're not checking > the error returned by `os.MkdirAll` so I would presume that creating the > directory "a" is failing on your system. Try printing the error returned by > `os.MkdirAll`. > > On Thu, Oct 15, 2020 at 3:59 PM nilsocket <nils...@gmail.com> wrote: > >> var fileName = `408_-IMG >> SRC=javascript:alert('XSS')-` >> var dir1 = "a" >> >> func main() { >> createFile(dir1, fileName) // not working, any dir not working >> createFile("", fileName) // working >> createFile("c", "d") // working >> } >> >> func createFile(dir, filename string) { >> os.MkdirAll(dir, os.ModePerm) >> >> if f, err := os.Create(filepath.Join(dir, filename)); err != nil { >> log.Println(err) >> } else { >> f.Close() >> } >> } >> >> I was trying to create this file from yesterday, I went through windows >> documentation, but not able to find any solution. >> >> I'm getting error: Linked picture >> >> Filename length is 221 >> With dir: 223 >> It doesn't cross windows Max path length, I'm running windows 10 Home >> version 1909. >> It doesn't contain any invalid characters. >> >> It's working fine in Linux. >> >> If there something wrong with what I'm doing or a bug? >> >> >> Thank you >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/0aaec817-0709-4d96-83f2-cc3d55439b10n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/0aaec817-0709-4d96-83f2-cc3d55439b10n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b8215656-e865-4b10-ab3b-72a662922ac3n%40googlegroups.com.