I am trying to call tar
from a Qt
project:
QProcess::execute("/bin/su", {"-", "user", "-c", "\'/bin/tar xpf /tmp/smt.tbz2 -C /tmp\'"})
Bit I am getting:
-su: /bin/tar xpf /tmp/smt.tbz2 -C /tmp: No such file or directory
It looks like the su
command does not interpret correctly the command after -c
.