Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

1 changed file:

Changes:

  • tools/fix_gradle_deps.py
    ... ... @@ -61,8 +61,11 @@ for u, h in pairs:
    61 61
         if not p.exists():
    
    62 62
             p.parent.mkdir(parents=True, exist_ok=True)
    
    63 63
             if p in existing:
    
    64
    -            print(f"Copying {p} from {existing[p]}")
    
    65
    -            shutil.copyfile(existing[p], p)
    
    64
    +            print(f"Copying/linking {p} from {existing[p]}")
    
    65
    +            try:
    
    66
    +                os.link(existing[p], p)
    
    67
    +            except OSError:
    
    68
    +                shutil.copyfile(existing[p], p)
    
    66 69
             else:
    
    67 70
                 print(f"Downloading {u}")
    
    68 71
                 r = requests.get(u)