Fix error when there already is an DZI directory

This commit is contained in:
David Vogel 2023-12-23 10:41:05 +01:00
parent f0ee3e2399
commit b76124b2e4

View File

@ -108,7 +108,7 @@ func (d DZI) ExportDZITiles(outputDir string) error {
for zoomLevel := d.maxZoomLevel; zoomLevel >= 0; 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)
}