INNER CODE UNIT · Python

newLink

apistol78/traktor · scripts/misc/sysroot-relativelinks.py:24

    newLink = os.path.relpath(topdir+link, subdir)

    print("\t%s replacing %s => %s" % (filePath, link, newLink))
    os.unlink(filePath)
    os.symlink(newLink, filePath)

for subdir, dirs, files in os.walk(topdir):
    for file in files:
        filePath = os.path.join(subdir, file)
        if os.path.islink(filePath):
            handlelink(filePath, subdir)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…