mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Fix error when there already is an DZI directory
This commit is contained in:
parent
f0ee3e2399
commit
b76124b2e4
@ -108,7 +108,7 @@ func (d DZI) ExportDZITiles(outputDir string) error {
|
|||||||
for zoomLevel := d.maxZoomLevel; zoomLevel >= 0; zoomLevel-- {
|
for zoomLevel := d.maxZoomLevel; zoomLevel >= 0; zoomLevel-- {
|
||||||
|
|
||||||
levelBasePath := filepath.Join(outputDir, fmt.Sprintf("%d", zoomLevel))
|
levelBasePath := filepath.Join(outputDir, fmt.Sprintf("%d", zoomLevel))
|
||||||
if err := os.Mkdir(levelBasePath, 0755); err != nil {
|
if err := os.MkdirAll(levelBasePath, 0755); err != nil {
|
||||||
return fmt.Errorf("failed to create zoom level base directory %q: %w", levelBasePath, err)
|
return fmt.Errorf("failed to create zoom level base directory %q: %w", levelBasePath, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user