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

Fix crash when loading read-only ReadWriteZipFiles. #13559

Merged
merged 1 commit into from Jul 8, 2017

Conversation

Projects
None yet
4 participants
@pchote
Member

pchote commented Jun 27, 2017

Fixes #13557.

@pchote pchote added this to the Playtest featuring updated HitShapes milestone Jun 27, 2017

@reaperrr

Tested AppVeyor artifacts from this and a different branch, can confirm it fixes the crash.

@rob-v

It fixes problem with opening readonly map/package, one issue/question.

Show outdated Hide outdated OpenRA.Game/FileSystem/ZipFile.cs
@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Jul 7, 2017

Member

Fixed.

Member

pchote commented Jul 7, 2017

Fixed.

@RoosterDragon RoosterDragon merged commit f7c57cf into OpenRA:bleed Jul 8, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@RoosterDragon

This comment has been minimized.

Show comment
Hide comment
@RoosterDragon
Member

RoosterDragon commented Jul 8, 2017

@rob-v

Question (issue?) for confirmation.

@@ -225,14 +221,13 @@ public static bool TryParseReadWritePackage(string filename, out IReadWritePacka
return false;
}
var s = new FileStream(filename, FileMode.Open);
package = new ReadWriteZipFile(s, filename);
package = new ReadWriteZipFile(filename);

This comment has been minimized.

@rob-v

rob-v Jul 8, 2017

Contributor

If the file didn't exist, FileNotFoundException was thrown, now it will create empty MemoryStream. Is it alright?

@rob-v

rob-v Jul 8, 2017

Contributor

If the file didn't exist, FileNotFoundException was thrown, now it will create empty MemoryStream. Is it alright?

This comment has been minimized.

@pchote

pchote Jul 8, 2017

Member

It should be fine in practice, but it is kind of nasty from a design perspective. I'll fix this in a followup PR.

@pchote

pchote Jul 8, 2017

Member

It should be fine in practice, but it is kind of nasty from a design perspective. I'll fix this in a followup PR.

@pchote pchote deleted the pchote:fix-readonly-zip branch Oct 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment