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

Shared folders return size None leading to issue in compare #2

Open
srggrs opened this issue Nov 16, 2021 · 4 comments
Open

Shared folders return size None leading to issue in compare #2

srggrs opened this issue Nov 16, 2021 · 4 comments

Comments

@srggrs
Copy link

srggrs commented Nov 16, 2021

When I compare a shared folder, the returned size from info method is None, see this line in the code base

@lmoresi
Copy link
Member

lmoresi commented Nov 17, 2021

This is not the world's most robust code, so it does not surprise me that it produces some surprises.

Is the problem that it flags false for remote == local as a result of this casual coding, or is does it throw an error ?

@srggrs
Copy link
Author

srggrs commented Nov 17, 2021

The problem is that it compares None (size from remote) with a float/integer (size from local) at this line. The comparison gives an error because the two sizes are of different type

@lmoresi
Copy link
Member

lmoresi commented Nov 21, 2021

OK - I guess there is an inconsistency in the return value for folders depending on whether they are remote or local. We can be more strict here to reject folder comparisons since there is not an obvious way to check a whole folder without some capacity for a checksum.

@srggrs
Copy link
Author

srggrs commented Nov 22, 2021

I think the only option is list folders and subfolders for both remote and local and make a diff, if files exist in both, check the file size

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