Skip to content

symlink removal after a fresh build #1618

Open
@azutechNL

Description

@azutechNL

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions