Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

floyd data upload does not work with symlinks on Mac #231

Open
glancashire opened this issue Aug 22, 2019 · 2 comments
Open

floyd data upload does not work with symlinks on Mac #231

glancashire opened this issue Aug 22, 2019 · 2 comments
Assignees

Comments

@glancashire
Copy link

I have several collections of images which I consolidate with symlinks.

When I execute floyd data upload the symlinks and not the files are uploaded.
So an invalid 0kb file instead of the image.

Is there a way to circumvent this?

Kind Regards
Graham

@ReDeiPirati
Copy link
Contributor

ReDeiPirati commented Aug 23, 2019

Hi @glancashire,

Is there a way to circumvent this?

Yes, by default the TarFile object doesn't follow the symlink but provides only the link file. You can change this by editing this line in this way:

with tarfile.open(self.filename, "w:gz", dereference=True) as tar:

Let me know if this works.

@ReDeiPirati ReDeiPirati self-assigned this Aug 23, 2019
@glancashire
Copy link
Author

Hi @KingOfThePirates

it seems to work, once I removed any broken symlinks, which cause it to crash/abort.

Kind regards
Graham

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants