Skip to content

Commit

Permalink
sly_unpacker: Default choice for 2nd/output argument
Browse files Browse the repository at this point in the history
  • Loading branch information
VelocityRa committed Dec 6, 2020
1 parent 76e157c commit 541d72d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sly_packer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) {
stream_write(wac_ofs, (u32) 0);

#ifdef NDEBUG
printf("Reading files");
printf("Packing files");
#endif

for (auto &p : std::filesystem::recursive_directory_iterator(input_dir_path)) {
Expand Down
4 changes: 2 additions & 2 deletions src/sly_unpacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ WACEntries parse_wac(std::istream &wac_data) {
int main(int argc, char *argv[]) {
try {
if (argc <= 2)
throw std::runtime_error(std::string(argv[0]) + " <input_file> <output_dir>");
throw std::runtime_error(std::string(argv[0]) + " <input_file> [<output_dir>]");

const std::string wac_path = argv[1];
const std::string output_path = argv[2];
const std::string output_path = (argc == 3) ? argv[2] : wac_path + "/extracted";

std::string wal_path = wac_path;
wal_path.back() = 'L';
Expand Down

0 comments on commit 541d72d

Please sign in to comment.