diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73ade49..e15b281 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,23 @@ on: - test_dent* - dent* +permissions: + contents: write + jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H%M%S')" - name: tests run: make test - name: create Release uses: softprops/action-gh-release@v1 with: + tag_name: Release-${{ steps.date.outputs.date }} files: | dent static-dent diff --git a/dent.c b/dent.c index d7fb235..fbfe94b 100644 --- a/dent.c +++ b/dent.c @@ -37,7 +37,6 @@ void listDirThreaded(const char *path) { for (bpos = 0; bpos < nread;) { d = (struct linux_dirent64 *) (buf + bpos); - if (strcmp(d->d_name, ".") != 0 && strcmp(d->d_name, "..") != 0) { printf("%s/%s\n", path, d->d_name); @@ -52,7 +51,6 @@ void listDirThreaded(const char *path) { pthread_detach(tid); } } - bpos += d->d_reclen; } } diff --git a/main.c b/main.c index c4d39da..d73e7ec 100644 --- a/main.c +++ b/main.c @@ -18,8 +18,6 @@ int main(int argc, char *argv[]) { printf("%s\n", startDir); listDirThreaded(startDir); pthread_exit(NULL); - sem_destroy(&semaphore); - return 0; } \ No newline at end of file