Opened 2 years ago

Closed 23 months ago

#28014 closed defect (fixed)

MR16: Avoid creating files with name length > 255

Reported by: galois Owned by:
Priority: major Milestone: sage-8.9
Component: pickling Keywords: days101
Cc: vdelecroix Merged in:
Authors: Isuru Fernando Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 6b27888 (Commits, GitHub, GitLab) Commit: 6b27888a9fa6b856273e52cf52814d57d79af9f2
Dependencies: Stopgaps:

Status badges

Change History (9)

comment:1 Changed 2 years ago by isuruf

  • Cc vdelecroix added
  • Component changed from PLEASE CHANGE to pickling
  • Description modified (diff)
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 2 years ago by vdelecroix

(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()

`

comment:3 Changed 2 years ago by isuruf

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

comment:4 Changed 2 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

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

comment:5 Changed 2 years ago by galois

  • Commit changed from 064a8c3383c44dc6ad30a8ac2f1e71c5bc67e53b to 6b27888a9fa6b856273e52cf52814d57d79af9f2

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

6b27888Use hashing in all places

comment:6 Changed 2 years ago by isuruf

  • Status changed from positive_review to needs_review

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

comment:7 Changed 2 years ago by vdelecroix

  • Status changed from needs_review to positive_review

comment:8 Changed 2 years ago by vdelecroix

  • Keywords days101 added

comment:9 Changed 23 months ago by vbraun

  • Branch changed from u/galois/mrs/16/long_filename to 6b27888a9fa6b856273e52cf52814d57d79af9f2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.