diff --git a/src/etc/get-snapshot.py b/src/etc/get-snapshot.py index 1b314a049d9..8c85e5b8e39 100755 --- a/src/etc/get-snapshot.py +++ b/src/etc/get-snapshot.py @@ -9,7 +9,11 @@ def unpack_snapshot(triple, snap): tar = tarfile.open(dl_path) kernel = get_kernel(triple) for p in tar.getnames(): - name = p.replace("rust-stage0/", "", 1); + + # FIXME: Fix this once win32 snapshot globs are fixed. + name = p.replace("rust-stage0/stage3/", "", 1); + name = name.replace("rust-stage0/", "", 1); + stagep = os.path.join(triple, "stage0") fp = os.path.join(stagep, name) print("extracting " + p) diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py index 22dce4b8781..07af0202bfc 100644 --- a/src/etc/snapshot.py +++ b/src/etc/snapshot.py @@ -129,7 +129,7 @@ def make_snapshot(stage, triple, flag): file0 = partial_snapshot_name(date, rev, platform) def in_tar_name(fn): - cs = fn.split(os.sep) + cs = re.split(r"[\\/]", fn) if len(cs) >= 2: return os.sep.join(cs[-2:])