diff --git a/source/directive.c b/source/directive.c index 993038a..4a475b9 100644 --- a/source/directive.c +++ b/source/directive.c @@ -44,7 +44,7 @@ int add_directory(const char * const folder) { struct stat file_stat; entry_t entry; while ((mydirent = readdir(dir)) != NULL) { - if (strcmp(mydirent->d_name, ".") == 0 + if (strcmp(mydirent->d_name, ".") == 0 || strcmp(mydirent->d_name, "..") == 0) { continue; } @@ -230,7 +230,7 @@ int execute_directive_file(FILE * f) { struct stat file_stat; int es = stat(touch_buffer, &file_stat); - CHECK_OPEN(!(es == -1), touch_buffer, goto recovery); // XXX + CHECK_OPEN(!(es == -1), touch_buffer, goto recovery); touch_entry = (entry_t) { .name = touch_buffer, diff --git a/test/CMDTEST_vimdir.rb b/test/CMDTEST_vimdir.rb index 84a854c..d6754bf 100644 --- a/test/CMDTEST_vimdir.rb +++ b/test/CMDTEST_vimdir.rb @@ -183,7 +183,7 @@ class CMDTEST_mydir < Cmdtest::Testcase File.write('target.txt', [ "000\t./mydir/.gitkeep", - "002\t./mydir/script.sh" + "002\t./mydir/script.sh", ].join("\n") )