Skip to content

Commit

Permalink
Merge pull request #767 from anteo/workaround-for-unzip-encoding-in-m…
Browse files Browse the repository at this point in the history
…acos

Workaround for Unzip to work in MacOS (skips recent OEM encoding checks for now)
  • Loading branch information
elfmz authored Oct 6, 2020
2 parents f5846d2 + ecb1b18 commit c69d3eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions multiarc/src/arccmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ bool ArcCommand::ProcessCommand(std::string FormatString, int CommandType, int I
if ((Hide == 1 && CommandType == 0) || CommandType == 2)
Hide = 0;

// Unzip in MacOS doesn't have -I and -O options thus it fails when extracting any file,
// Would need another workaround, but let's just skip it for now
#ifdef __WXOSX__
ExecCode = Execute(this, Command, Hide, Silent, NeedSudo, Password.empty(), ListFileName);
fprintf(stderr, "ArcCommand::ProcessCommand: ExecCode=%d for '%s'\n", ExecCode, Command.c_str());
#else
// charset workarounds for unzip
if (strncmp(Command.c_str(), "unzip ", 6) == 0) {
// trying as utf8
Expand Down Expand Up @@ -148,6 +154,7 @@ bool ArcCommand::ProcessCommand(std::string FormatString, int CommandType, int I
}
}
}
#endif

if (ExecCode==RETEXEC_ARCNOTFOUND)
return false;
Expand Down

0 comments on commit c69d3eb

Please sign in to comment.