Create directory when overwrite option is set #533

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

Originally created by @rhuesken on GitHub (Aug 24, 2022).

In 0.32.2, I found that I need to create the "destination" directory first, in order for this call to succeed:

                    reader.WriteEntryToDirectory(destination, new ExtractionOptions()
                    {
                        ExtractFullPath = true,
                        Overwrite = overWrite
                    });

This was working fine with 0.28.2, which creates the "destination" directory if it does not exists. Is this the same issue as #614 ? I have the impression it should have been fixed in 0.29.0... Is that correct?

Originally created by @rhuesken on GitHub (Aug 24, 2022). In 0.32.2, I found that I need to create the "destination" directory first, in order for this call to succeed: reader.WriteEntryToDirectory(destination, new ExtractionOptions() { ExtractFullPath = true, Overwrite = overWrite }); This was working fine with 0.28.2, which creates the "destination" directory if it does not exists. Is this the same issue as #614 ? I have the impression it should have been fixed in 0.29.0... Is that correct?
Author
Owner

@Erior commented on GitHub (Aug 25, 2022):

From what I can see, the 0.29 change checks that you have already created it before calling WriteEntryToDirectory

@Erior commented on GitHub (Aug 25, 2022): From what I can see, the 0.29 change checks that you have already created it before calling WriteEntryToDirectory
Author
Owner

@adamhathcock commented on GitHub (Sep 6, 2022):

Maybe overwrite should always create the directory. Can't recall the reason for change at the moment

@adamhathcock commented on GitHub (Sep 6, 2022): Maybe overwrite should always create the directory. Can't recall the reason for change at the moment
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#533