mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: use shutil.move instead of Path.rename to move to purgatory
Otherwise it will fail if src and dest are not on the same FS.
This commit is contained in:
parent
85d65c5070
commit
c6c255e216
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import operator
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
|
@ -498,7 +499,7 @@ class DataLayer(NamedModel):
|
|||
src = Path(self.geojson.storage.location) / self.storage_root()
|
||||
for version in self.versions:
|
||||
name = version["name"]
|
||||
(src / name).rename(dest / f"{self.map.pk}_{name}")
|
||||
shutil.move(src / name, dest / f"{self.map.pk}_{name}")
|
||||
|
||||
def upload_to(self):
|
||||
root = self.storage_root()
|
||||
|
|
Loading…
Reference in a new issue