Skip to content

Commit

Permalink
TExec: Fix swap of .bat to .sh
Browse files Browse the repository at this point in the history
Was using sizeof() instead of size().
  • Loading branch information
oblivioncth committed Jul 6, 2024
1 parent fb9c9d7 commit df98abf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/task/t-exec_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ QString TExec::resolveExecutablePath()
* of how the system would handle it.
*/

// Exception: If a windows batch script is called for (shouldn't happen), see if there is a matching shell script
// as a last resort
// Exception: If a windows batch script is called for by this point (uncommon), see if there is a matching shell script
QFileInfo execInfo(mExecutable);
if(execInfo.suffix() == SHELL_EXT_WIN)
{
execInfo.setFile(mExecutable.chopped(sizeof(SHELL_EXT_WIN)) + SHELL_EXT_LINUX);
execInfo.setFile(mExecutable.chopped(SHELL_EXT_WIN.size()) + SHELL_EXT_LINUX);
emit eventOccurred(NAME, LOG_EVENT_FORCED_BASH);
}

Expand Down

0 comments on commit df98abf

Please sign in to comment.