it might not exist yet
This commit is contained in:
parent
e925eb133b
commit
e6d9313334
1 changed files with 3 additions and 3 deletions
|
@ -7,9 +7,9 @@ from tempfile import mkdtemp
|
||||||
|
|
||||||
SCRATCH_DIR = Path.home() / "scratch"
|
SCRATCH_DIR = Path.home() / "scratch"
|
||||||
WEEK_SCRATCH = SCRATCH_DIR / datetime.now().strftime("%Y/%U")
|
WEEK_SCRATCH = SCRATCH_DIR / datetime.now().strftime("%Y/%U")
|
||||||
|
if (SCRATCH_CURRENT := SCRATCH_DIR / "current").is_dir():
|
||||||
(SCRATCH_DIR / "current").unlink()
|
SCRATCH_CURRENT.unlink()
|
||||||
(SCRATCH_DIR / "current").symlink_to(WEEK_SCRATCH)
|
SCRATCH_CURRENT.symlink_to(WEEK_SCRATCH)
|
||||||
|
|
||||||
|
|
||||||
def scratch_maintenance():
|
def scratch_maintenance():
|
||||||
|
|
Loading…
Add table
Reference in a new issue