kdudkov / goatak

go ATAK/CivTAK fast and simple server and client
https://github.com/kdudkov/goatak/wiki
GNU Affero General Public License v3.0
112 stars 31 forks source link

There is a problem when accessing the embedFS on Windows build. #7

Closed kbtxwer closed 9 months ago

kbtxwer commented 9 months ago

The console will show something like "open templetes/head.html file not exist" and which leads to the web ui failure. I have solved the problem by adding

fname = strings.ReplaceAll(fname, "\\", "/")

which means change the Windows like separator into Unix like separator, before the filename sends to fs.Readfile()

However, maybe my solution is not so perfect and may cause other problems, could you please check if my solution always work nice or fix it with another way?

kdudkov commented 9 months ago

@kbtxwer, please check now

kbtxwer commented 9 months ago

Thanks, I learned from it.