bench icon indicating copy to clipboard operation
bench copied to clipboard

symlink removal after a fresh build

Open azutechNL opened this issue 8 months ago • 1 comments

Add these changes into the build.py

This fixes the issue that the symlink are removed after a fresh build:

def link_assets_dir(source, target, hard_link=False): if not os.path.exists(source): return

if os.path.exists(target):
    if os.path.islink(target):
        return  
    else:
        shutil.rmtree(target)  # Deletes directory if it's not a symlink

if hard_link:
    shutil.copytree(source, target, dirs_exist_ok=True)
else:
    symlink(source, target, overwrite=True)

azutechNL avatar Mar 10 '25 22:03 azutechNL