-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Flat Extraction Feature #197
base: master
Are you sure you want to change the base?
Conversation
@mega5800 Thank you for your contribution! I left a few comments that should help you simplify the code and some minor naming convention notes. To get the test working I think you can just go add new tests to CommandLineExtractTests.cs like this one. Just choose an existing small test file like the NUnit-2.5.2.9222.msi used in several tests there and make sure that the test function itself has a unique name and the
Then you can copy the generated actual file to the location of the expected file (just be sure to verify that the output in that file is correct). Once you run the test again it should pass. Let me know if that doesn't help - if it doesn't just try to write the test and add it to the PR and I'll take a look. Sorry I'm not more help right now but I'm on an ARM mac and struggling to get windows to run. |
Thank you @activescott for your comments regarding my pull request. I have addressed most of your comments and marked them as resolved. Thank you. |
…hod logic for better support of flat msi files extraction
Hello @activescott. I covered all your comments. If you are content with the code, I will start working on the tests code. |
Hello @activescott. For some reason, I was unable to produce the actual output files following your steps. Thank you. |
Thanks @mega5800 ! I'll get looking into this tonight and figure out how to get those files generated. I must have forgotten something as I haven't added new ones in a while myself! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment with steps that I think will help you get that test working. Tag me in a follow-up comment if it doesn't work! And if it does, request another review from me or tag me and we'll get this merged once those tests are passing.
while (++i < args.Count) | ||
filesToExtract.Add(args[i]); | ||
|
||
Program.DoExtraction(msiFile, extractDir.TrimEnd('\"'), filesToExtract, getExtractionMode(allArgs[0])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for allArgs.Length < 1
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please elaborate?
Hello @activescott. I updated the testing logic to adapt for the flat extraction feature, and now I am able to run all the tests successfully. First one is about implementing IEquatable interface to a struct I created for grouping file entry comparison bool value and possible error message. Thank you. |
Great! I'll take a look tomorrow or the next day! |
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
Please fill out the following checklist:
If you need any help at all, feel free to submit the PR and @-mention activescott and I'll be happy to assist!
Hello @activescott
I took care of this ticket.
I added new CLI commands "xfo" and "xfr".
"xfo" allows the user to flat extract MSI files while overwriting files with the same name.
"xfr" allows the user to flat extract MSI files while renaming files with the same name using the suffix "_" with a count.
As discussed, I experienced a few issues with creating test files for this new behaviour.
So I am sending this PR as you suggested.
Please let me know if you have any questions.
Thank you.