From 9ed22c3f39a2a49ea5317bc5847b752d08be8b10 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 30 Apr 2019 10:13:36 +0200 Subject: [PATCH] make.go: fix paths for windows And fix initial stat argument Change-Id: I35a0aeb0756e283462437beee18a31d860b96dec --- make.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/make.go b/make.go index 7f45119e4..e3aedd039 100644 --- a/make.go +++ b/make.go @@ -505,12 +505,12 @@ func makeJS(doWebUI, doPublisher bool) error { func fetchAllJS(doWebUI, doPublisher bool) error { if doPublisher { - if err := fetchJS(publisherJSURL, publisherJS); err != nil { + if err := fetchJS(publisherJSURL, filepath.FromSlash(publisherJS)); err != nil { return err } } if doWebUI { - if err := fetchJS(gopherjsUIURL, gopherjsUI); err != nil { + if err := fetchJS(gopherjsUIURL, filepath.FromSlash(gopherjsUI)); err != nil { return err } } @@ -523,10 +523,8 @@ func fetchAllJS(doWebUI, doPublisher bool) error { // matching hashsum, it does not actually fetch jsURL. If it does, it checks that // the newly written file does match the hashsum. func fetchJS(jsURL, jsOnDisk string) error { - // TODO(mpl): use If-Modified-Since? I think pre-fetching hash is good enough already. - // See if we already have the file on disk var currentSum string - _, err := os.Stat(jsURL) + _, err := os.Stat(jsOnDisk) if err != nil { if !os.IsNotExist(err) { return err