Skip to content

Commit

Permalink
misc/ios: more predictable zoneinfo.zip location
Browse files Browse the repository at this point in the history
See golang.org/cl/6511.

Change-Id: I2145a42877ed6b78400f29c2ef18969870dab5c3
Reviewed-on: https://go-review.googlesource.com/6512
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
crawshaw committed Mar 3, 2015
1 parent f46e51a commit 66416c0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions misc/ios/go_darwin_arm_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,17 @@ func copyLocalData(dstbase string) (pkgpath string, err error) {
}

// Copy timezone file.
//
// Typical apps have the zoneinfo.zip in the root of their app bundle,
// read by the time package as the working directory at initialization.
// As we move the working directory to the GOROOT pkg directory, we
// install the zoneinfo.zip file in the pkgpath.
if underGoRoot {
dst := filepath.Join(dstbase, "lib", "time")
os.MkdirAll(dst, 0755)
if err := cp(dst, filepath.Join(cwd, "lib", "time", "zoneinfo.zip")); err != nil {
err := cp(
filepath.Join(dstbase, pkgpath),
filepath.Join(cwd, "lib", "time", "zoneinfo.zip"),
)
if err != nil {
return "", err
}
}
Expand Down

0 comments on commit 66416c0

Please sign in to comment.