Fix too long WindowsFileLock name
MEMBER
Windows users should disable the max path length limit. It's a nightmare to handle it.
Also the lock path must not be changed in a random way. Otherwise from another process the lock path might not be the same and the locking mechanism won't work.
2021-04-14T13:47:47Z
https://github.com/huggingface/datasets/pull/2222#issuecomment-819532029
https://api.github.com/repos/huggingface/datasets/issues/2222
MDEyOklzc3VlQ29tbWVudDgxOTUzMjAyOQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/819532029/reactions
2021-04-14T13:47:47Z
https://api.github.com/repos/huggingface/datasets/issues/comments/819532029
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Do you agree with handling the case where MAX_PATH is not disabled? If not, we can close this PR.

If so, would it work a deterministic lock path instead of random?
2021-04-14T14:13:40Z
https://github.com/huggingface/datasets/pull/2222#issuecomment-819551175
https://api.github.com/repos/huggingface/datasets/issues/2222
MDEyOklzc3VlQ29tbWVudDgxOTU1MTE3NQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/819551175/reactions
2021-04-14T14:13:40Z
https://api.github.com/repos/huggingface/datasets/issues/comments/819551175
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
MEMBER
I'd rather not handle this at all, since there will be other places in the code where the limit will break things
2021-04-14T14:39:21Z
https://github.com/huggingface/datasets/pull/2222#issuecomment-819570250
https://api.github.com/repos/huggingface/datasets/issues/2222
MDEyOklzc3VlQ29tbWVudDgxOTU3MDI1MA==
https://api.github.com/repos/huggingface/datasets/issues/comments/819570250/reactions
2021-04-14T14:39:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/819570250
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
Fix WindowsFileLock name longer than allowed MAX_PATH by shortening the basename.