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

add: handle long filenames #5201

Merged
merged 1 commit into from
Jan 5, 2021
Merged

add: handle long filenames #5201

merged 1 commit into from
Jan 5, 2021

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Jan 4, 2021

We lack more tests for PATH_MAX and NAME_MAX across the board 🙁

Also need to catch initial internal checkout problems after add and provide some helpful message/mechanism to let the user know that the data is safe and can be recovered.

Fixes #5200

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@@ -174,7 +174,7 @@ def move(self, from_info, to_info, mode=None):
move(from_info, to_info, mode=mode)

def copy(self, from_info, to_info):
tmp_info = to_info.parent / tmp_fname(to_info.name)
tmp_info = to_info.parent / tmp_fname("")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed helpful before to keep the relation between the original file name and this temp file if something goes wrong, but in reality the data is already in cache at this point so it would be helpful to just provide intructions/mechanism to recover it. Aaand we delete this temp file anyway down below 🙂

@efiop
Copy link
Contributor Author

efiop commented Jan 4, 2021

@Mergifyio backport 1.11

@efiop efiop force-pushed the fix-5200 branch 3 times, most recently from ef3c28d to c891364 Compare January 5, 2021 07:25
@efiop efiop changed the title [WIP] add: handle long filenames add: handle long filenames Jan 5, 2021
@efiop
Copy link
Contributor Author

efiop commented Jan 5, 2021

We are currently working on refactoring and separating cache save logic (e.g. in #4520 and refactoring ExternalRepo) that will allow us to separate saving and checking out and more gracefully recover from such errors. This PR is simply to handle happy path for the long filenames.

@efiop efiop merged commit b779a11 into iterative:master Jan 5, 2021
mergify bot pushed a commit that referenced this pull request Jan 5, 2021
(cherry picked from commit b779a11)
efiop added a commit that referenced this pull request Jan 5, 2021
(cherry picked from commit b779a11)

Co-authored-by: Ruslan Kuprieiev <[email protected]>
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

Successfully merging this pull request may close these issues.

File gets deleted if the name is too long
2 participants