Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow datasource imports on Windows #22264

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions superset/commands/importers/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# under the License.

import logging
from pathlib import Path
from pathlib import Path, PurePosixPath
from typing import Any, Dict, List, Optional
from zipfile import ZipFile

Expand All @@ -34,8 +34,8 @@

def remove_root(file_path: str) -> str:
"""Remove the first directory of a path"""
full_path = Path(file_path)
relative_path = Path(*full_path.parts[1:])
full_path = PurePosixPath(file_path)
relative_path = PurePosixPath(*full_path.parts[1:])
return str(relative_path)


Expand Down