Commit 46c7fc18 authored by Kusanagi Kouichi's avatar Kusanagi Kouichi Committed by Luiz Capitulino
Browse files

monitor: Ignore "." and ".." when completing file name.

parent 945d3e63
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3976,6 +3976,11 @@ static void file_completion(const char *input)
        d = readdir(ffs);
        if (!d)
            break;

        if (strcmp(d->d_name, ".") == 0 || strcmp(d->d_name, "..") == 0) {
            continue;
        }

        if (strstart(d->d_name, file_prefix, NULL)) {
            memcpy(file, input, input_path_len);
            if (input_path_len < sizeof(file))