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

Highlight with name "..." and several other problems with dots in names on Linux/Windows #859

Closed
UweLau opened this issue Nov 6, 2020 · 4 comments · Fixed by #1452
Closed
Labels
bug Bug stale Issue is inactive for a long time

Comments

@UweLau
Copy link

UweLau commented Nov 6, 2020

Describe the bug
I tried to download a profile where the user choose to name all the highlights "..." (three ASCII dots).
Problem 1: On Linux the highlights are all downloaded but all in the same directory "..." but at least it gets downloaded
Problem 2: On Windows I get a error:
FileNotFoundError: [Errno 2] No such file or directory: 'xxxxxxx\\...\\2019-11-20_16-13-30_UTC_cover.jpg.temp'
Problem 3: When I copy over the "..." directory to Windows it behaves very strangely.
Problem 4: When I download some highlight on Windows with a dot at the end, like f.e. "Mun." it gets truncated to "Mun" because Windows wont allow a dot at the end. Linux on the other hand allows the download but I have to manually rename the copy when I tranfer it to Windows so I can access its content.

To Reproduce
instaloader --login xxx --password xxx -highlights XXXX with a user that has above mentioned highlight names. Dont have anything that is public ...

Expected behavior
Well the question is not easily answered as there are several approaches for that:
Extend the forbidden characters a bit more to also include combinations, like for example "..." or omit ending dots in general. The would have to be on all platforms so one can transfer the files between. The simpler the better.
This does not solve the problem with naming two or more the same, it would still all go to one directory and would even go further if two highlights are dumbed down so they end up with the same name.

So my idea would be to use the ID number of the highlight itself. I dont know if there is one that is unique or at least not used with the same user but that would be the best solution. Something like "938317195183-D__bed d_w_ed high__ght" would be perfect, or "D__bed d_w_ed high__ght-938317195183".

Error messages and tracebacks
see above for the Windows error message

Instaloader version
4.5.3

@UweLau UweLau added the bug Bug label Nov 6, 2020
@Thammus
Copy link
Member

Thammus commented Nov 7, 2020

Problems with dots in highlight names have already been reported in other issues, for example #710.

Copying folders to Windows that have been downloaded on Linux would still be a problem if all problematic names get sanitized on Windows only. One could implement an optional flag that does rigorous replacements of all problematic strings and could be used on all operating systems to maintain the possibility to interchange the folders.

I had no idea that one profile can have multiple highlights with the same name. Including a unique ID into the folder name is a nice idea to differentiate between those.

@UweLau
Copy link
Author

UweLau commented Nov 7, 2020

@Thammus
My apologies. I am afraid I did not see issue #710.
As mentioned in my (draft) pull request I would prefer also as an option but I am not qualified enough to do it myself.
I am afraid I can not show you the profile as it is private but you must believe me it is possible to have the same name twice and more. I really hope there is some unique ID somewhere or my whole idea will not work ...

@github-actions
Copy link

github-actions bot commented Feb 6, 2021

There has been no activity on this issue for an extended period of time. This issue will be closed after further 14 days of inactivity.

@github-actions
Copy link

There has been no activity on this issue for an extended period of time. This issue will be closed after further 14 days of inactivity.

@github-actions github-actions bot added the stale Issue is inactive for a long time label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug stale Issue is inactive for a long time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants