Skip to content

Commit

Permalink
Skip directory paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mxrcode committed Nov 8, 2024
1 parent 8e8c164 commit 2504c64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file-shredder-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ int main(int argc, char* argv[]) {
continue; // Skip to the next file
}

if (std::filesystem::is_directory(filepath)) {
std::cout << "Skipping directory: " << filepath << "\n";
continue; // Skip directories
}

if (confirmDestroy()) {
zeroFill(filepath);

Expand Down

0 comments on commit 2504c64

Please sign in to comment.