anthdm / superkit

MIT License
703 stars 68 forks source link

Checked if the error returned was that the folder did not exist #2

Closed PierreFinnimore closed 3 weeks ago

PierreFinnimore commented 3 weeks ago

I was getting an error on Windows because apparently it throws an error on folder non-existence.

The second line change flows from the first, because if you get that specific error, fi doesn't exist, so fi.isDir() will fail, and since it doesn't exist, we don't need to remove it.

Apologies in advance if this is non-idiomatic Go code, this is one of my first Go projects. I'm happy to make any modifications needed (or close this issue if there's a better way to resolve this problem).