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

MR16: Avoid creating files with name length > 255 #28014

Closed
sagetrac-gitlab-bot mannequin opened this issue Jun 19, 2019 · 10 comments
Closed

MR16: Avoid creating files with name length > 255 #28014

sagetrac-gitlab-bot mannequin opened this issue Jun 19, 2019 · 10 comments

Comments

@sagetrac-gitlab-bot
Copy link
Mannequin

sagetrac-gitlab-bot mannequin commented Jun 19, 2019

Isuru Fernando (@isuruf) opened a merge request at https://gitlab.com/sagemath/sage/merge_requests/16:


CC: @videlec

Component: pickling

Keywords: days101

Author: Isuru Fernando

Branch/Commit: 6b27888

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/28014

@sagetrac-gitlab-bot sagetrac-gitlab-bot mannequin added this to the sage-8.9 milestone Jun 19, 2019
@isuruf

This comment has been minimized.

@videlec
Copy link
Contributor

videlec commented Jun 19, 2019

comment:2

(porting a comment written in gitlab)

Why not hashing in all situations? If so there is no need to replace separator with underscores

    mangled = hashlib.sha256(os.path.realpath(SAGE_LIB).encode('utf-8')).hexdigest()

@isuruf
Copy link
Member

isuruf commented Jun 19, 2019

comment:3

I think it was because I do .encode('utf-8') and was not sure if it works everywhere

@videlec
Copy link
Contributor

videlec commented Jun 19, 2019

comment:4

Your version is less intrusive but also less tested. If it works for you it is good enough for me :-)

@videlec
Copy link
Contributor

videlec commented Jun 19, 2019

Reviewer: Vincent Delecroix

@sagetrac-gitlab-bot
Copy link
Mannequin Author

sagetrac-gitlab-bot mannequin commented Jun 19, 2019

Changed commit from 064a8c3 to 6b27888

@sagetrac-gitlab-bot
Copy link
Mannequin Author

sagetrac-gitlab-bot mannequin commented Jun 19, 2019

comment:5

New commits added to merge request. I updated the commit SHA-1. New commits:

6b27888Use hashing in all places

@isuruf
Copy link
Member

isuruf commented Jun 19, 2019

comment:6

Some file systems (like the file system on cocalc) has a limit of 128. So, I've used your suggestion of hashing everywhere instead of checking for a limit

@videlec
Copy link
Contributor

videlec commented Jun 19, 2019

Changed keywords from none to days101

@vbraun
Copy link
Member

vbraun commented Jun 28, 2019

Changed branch from u/galois/mrs/16/long_filename to 6b27888

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

No branches or pull requests

3 participants