Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Feb 29, 2024
1 parent a895a86 commit 7c4f2ad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion worker/preparegspatialjp/generate_citygml_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,18 @@ func (z *CityGMLZipWriter) Write(ctx context.Context, src *zip.Reader, ty, prefi

func cityGMLZipPath(ty, prefix string) func(*zip.File) (string, error) {
return func(f *zip.File) (string, error) {
rawPath := f.Name
p := f.Name
p = strings.ReplaceAll(p, `\`, "/")
p = strings.TrimSuffix(p, "/")

if strings.HasPrefix(p, "__MACOSX/") ||
strings.HasSuffix(p, "/.DS_Store") ||
strings.HasSuffix(p, "/Thumb.db") ||
p == ".DS_Store" || p == "Thumbs.db" {
return "", nil
}

rawPath := f.Name
if prefix != "" {
if strings.HasPrefix(p, prefix) {
p = strings.TrimPrefix(p, prefix)
Expand Down

0 comments on commit 7c4f2ad

Please sign in to comment.