Antoine Kaufmann ·
! shell: Mehrere Leerzeichen hinter start ignorieren Signed-off-by: Antoine Kaufmann <toni at tyndur.org> --- src/modules/c/shell/commmands.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/modules/c/shell/commmands.c b/src/modules/c/shell/commmands.c index 86858d3..0c8e992 100644 --- a/src/modules/c/shell/commmands.c +++ b/src/modules/c/shell/commmands.c @@ -71,7 +71,14 @@ int shell_start_path_app(const char* cmd, bool wait) { DEBUG_MSG1("Starte das Programm %s", cmd); - pid_t pid = init_execute(cmd); + pid_t pid; + + // Fuehrende Leerzeichen im Befehl grosszuegig ueberspringen + while (*cmd == ' ') { + cmd++; + } + + pid = init_execute(cmd); // Fehler ist aufgetreten if (pid == 0) { -- 1.6.0.6