From: Kusanagi Kouichi Date: Wed, 20 Oct 2010 09:00:01 +0000 (+0900) Subject: monitor: Ignore "." and ".." when completing file name. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~4110^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62bbcb516881b437e370e928ac04ac53127a7afe;p=sdk%2Femulator%2Fqemu.git monitor: Ignore "." and ".." when completing file name. Signed-off-by: Kusanagi Kouichi Signed-off-by: Luiz Capitulino --- diff --git a/monitor.c b/monitor.c index 260cc02963..61607c5bd6 100644 --- a/monitor.c +++ b/monitor.c @@ -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))