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

Error: Filename too long #28

Open
Menno-van-Dam opened this issue Oct 6, 2023 · 5 comments
Open

Error: Filename too long #28

Menno-van-Dam opened this issue Oct 6, 2023 · 5 comments

Comments

@Menno-van-Dam
Copy link

Menno-van-Dam commented Oct 6, 2023

Hello,

I am trying to download your code using GitHub Desktop, but I keep running into an error related to overly long file names:

Cloning into 'C:\ptha'...
remote: Enumerating objects: 28162, done.
remote: Counting objects: 100% (2758/2758), done.
remote: Compressing objects: 100% (1388/1388), done.
remote: Total 28162 (delta 1478), reused 2515 (delta 1318), pack-reused 25404
Receiving objects: 100% (28162/28162), 156.85 MiB | 8.65 MiB/s, done.
Resolving deltas: 100% (18246/18246), done.
error: unable to create file misc/probabilistic_inundation_tonga2020/swals/plots/historic_events_time_series_plots/Chile2010/nukualofa_gauge_modelVdata_Chile2010_validation_PTHA18_HS_128607_source-risetime_0-ambientsealevel_0.0-full-linear_with_manning-0.035-highres_tonga-RUN_20201130_172631113.png: Filename too long
error: unable to create file misc/probabilistic_inundation_tonga2020/swals/plots/historic_events_time_series_plots/Chile2015/nukualofa_gauge_modelVdata_Chile2015_validation_Williamson_source_inversion-risetime_0-ambientsealevel_0.0-full-linear_with_manning-0.035-highres_tonga-RUN_20201130_172630123.png: Filename too long
error: unable to create file misc/probabilistic_inundation_tonga2020/swals/plots/historic_events_time_series_plots/Tohoku2011/nukualofa_gauge_modelVdata_Tohoku2011_validation_PTHA18_HS_46994-risetime_0-ambientsealevel_0.0-full-linear_with_manning-0.035-highres_tonga-RUN_20201130_172740486.png: Filename too long
error: unable to create file misc/probabilistic_inundation_tonga2020/swals/plots/historic_events_time_series_plots/Tonga2006/nukualofa_gauge_modelVdata_Tonga2006_validation_PTHA18_VAUS_26849_load_balance-risetime_0-ambientsealevel_0.0-full-linear_with_manning-0.035-highres_tonga-RUN_20201130_172740871.png: Filename too long
Updating files: 100% (2260/2260), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

It appears that a couple of the png files included in your package have names that are too long for windows to process. I've tried downloading the package directly to the C drive, with no subfolders, but the path name is still too long. Downloading the files as a zip doesn't work either, presumably due to the same issue:

image

Could you adjust the filename of the pngs to something shorter? I am unable to download all of your files as it stands.

Thanks in advance,

@gareth-d-ga
Copy link
Collaborator

Done -- can you clone master now?

@Menno-van-Dam
Copy link
Author

It works now, but only if I place it directly in the C drive with no subfolders. However the filenames are still very long, which could likely lead to problems with other users. Once I place it in the documents folder for example, I again receive the error related to long file names.

@gareth-d-ga
Copy link
Collaborator

Thanks for the update. Glad you got it working. I agree it could cause problems so I'll leave this issue open for now.

@gareth-d-ga
Copy link
Collaborator

This link may show another workaround: https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows

@gareth-d-ga
Copy link
Collaborator

gareth-d-ga commented May 6, 2024

Another possible workaround is to use the 7-zip program to unzip the files. It seems able to work with relatively long file paths (where other zip programs fail on Windows) and supports regular .zip as well as other formats

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

No branches or pull requests

2 participants