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 <nilsoc...@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+unsubscr...@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/CABx2%3DD9nBMb06UoVb7NBXosVywU7UEMBofQvRn1a1PFNHEkmJg%40mail.gmail.com.