developmentseed / sat-gbdx

Library and CLI to search and access GBDX imagery
MIT License
3 stars 1 forks source link

Fixing Invalid cross-device link #10

Closed Rub21 closed 6 years ago

Rub21 commented 6 years ago

Error : 👇

[Errno 18] Invalid cross-device link: '/tmp/tmpc2zkn7sx/2004-07-28_quickbird-2_1010010003225C00.tif' -> './2004-07-28_quickbird-2_1010010003225C00.tif'

I have changed os.rename to shutil.move and saving the output files in the same directory as the metadata file.

cc @matthewhanson

matthewhanson commented 6 years ago

Yes!! Great catch @Rub21 ! I just plugged in my external drive to test this 10 minutes ago and you've fixed it!

I looked it up and internally Python implements os.rename as a hardlink, which makes sense as it's super fast because you don't have to copy the data, it just creates a new link to it.

Thanks!