Long path support? #393

Open
opened 2026-01-29 22:11:13 +00:00 by claunia · 2 comments
Owner

Originally created by @BergChristian on GitHub (Apr 5, 2020).

Hi

I get an error when doing this from a Archive:
arc.WriteToDirectory(tmpfolder, options)

Neither the file stream I am reading from or the tmp folder has long path but I think that inside the zip file there is a long path.

I am using net 4.72. Is there a way to handle this?

All the best
Christian

Originally created by @BergChristian on GitHub (Apr 5, 2020). Hi I get an error when doing this from a Archive: arc.WriteToDirectory(tmpfolder, options) Neither the file stream I am reading from or the tmp folder has long path but I think that inside the zip file there is a long path. I am using net 4.72. Is there a way to handle this? All the best Christian
Author
Owner

@adamhathcock commented on GitHub (Apr 5, 2020):

There’s a new long path API or something for windows right?

If I were you, I’d copy the extension method from my code and use it locally with a modification for that. Can always make a PR and submit it back to me too if you discover what the correct code is.

I haven’t used windows in years for development so I’m likely not going to fix this myself.

@adamhathcock commented on GitHub (Apr 5, 2020): There’s a new long path API or something for windows right? If I were you, I’d copy the extension method from my code and use it locally with a modification for that. Can always make a PR and submit it back to me too if you discover what the correct code is. I haven’t used windows in years for development so I’m likely not going to fix this myself.
Author
Owner

@BergChristian commented on GitHub (Apr 5, 2020):

Hi Adam,

Thanks for your quick email. I was an idiot. I needed to add \?\ before the path to the directory I wanted the files to be extracted to.

All the best
Christian

@BergChristian commented on GitHub (Apr 5, 2020): Hi Adam, Thanks for your quick email. I was an idiot. I needed to add \\?\ before the path to the directory I wanted the files to be extracted to. All the best Christian
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#393