Add Disc Support#3
Conversation
Sorry, what issues? I was unable to figure out what the problem is |
|
Is the Disc Path supposed to be an optional argument? It looks that way, but the readme has it in the mandatory <> signs. |
|
It is an optional argument yeah, should I replace it with [ ]? |
|
If it's optional, then a system to have unordered arguments needs to be added as well, as -u [disc path] and [disc path] -u should both be valid because they are optional |
|
Hmmm yeah, I'll get to implementing that. |
|
Done! I've also made the optional argument parser a function in case anybody wants to add more optional arguments in the future. |
| if (args.Length > 4 && args[4] != "-u") { // Make sure the argument in the position of Path_To_Disc_Output_Folder isn't the unibuild flag | ||
| Console.WriteLine(); | ||
| Console.WriteLine("Copying disc..."); | ||
| // if (args.Length > 4 && args[4] != "-u") { // Make sure the argument in the position of Path_To_Disc_Output_Folder isn't the unibuild flag |
There was a problem hiding this comment.
Oops, left that in accidentally, I'll fix it rn
SuperHackio
left a comment
There was a problem hiding this comment.
First time ever writing a review lol.
|
Done! |
|
Hey actually, what happens if two modules provide the same file? There should probably be a warning about that... |
|
Currently the last file to be copied is the one that stays, but now that you mention it... |
|
I would actually prefer that it be handled properly instead of just being a warning, if possible. |
|
Yea, also not sure how to handle it. |
|
Added a simple warning when a file is overwritten. |
|
|
||
| try { | ||
| if (Path.Exists(targetPath)) | ||
| Console.WriteLine($" - File will replace {targetPath}"); |
There was a problem hiding this comment.
I do not understand this error. what file will replace targetPath?
| } | ||
| catch (Exception e) { | ||
| Console.WriteLine($"Error while copying \"{sourceDiscFolder}\": {e.Message}"); | ||
| Console.WriteLine($"Error while copying {discFolder}: {e.Message}"); |
There was a problem hiding this comment.
Restore the quotation marks please

Users can now input a path to output disc files of modules too.
This also makes a slight change to how the unibuild flag is checked, which prevents some issues.