Skip to content

Commit

Permalink
remove extra check before removing (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Apr 28, 2021
1 parent d359bfb commit 67d47a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
=== rmw ChangeLog ===

2021-04-28

* bugfix: fixes test failing on osx using xcode 11.5 and above (#283)

2021-04-26

* rmw v0.7.07 released
Expand Down
24 changes: 8 additions & 16 deletions src/purging_rmw.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,14 @@ rmdir_recursive (const char *dirname, short unsigned level,
{
if (!S_ISDIR (st.st_mode))
{
if (exists (st_dirname_properties.path))
if (remove (st_dirname_properties.path) == 0)
{
if (remove (st_dirname_properties.path) == 0)
{
deleted_files_ctr++;
bytes_freed += st.st_size;
}
else
{
perror ("rmdir_recursive -> remove");
}
deleted_files_ctr++;
bytes_freed += st.st_size;
}
else
{
perror ("rmdir_recursive -> remove");
}
}
else
Expand Down Expand Up @@ -440,12 +437,7 @@ purge (st_config * st_config_data,
else
{
if (cli_user_options->want_dry_run == false)
{
if (exists (corresponding_file_to_purge))
status = remove (corresponding_file_to_purge);
else
status = -1;
}
status = remove (corresponding_file_to_purge);
else
status = 0;
if (status == 0)
Expand Down

0 comments on commit 67d47a9

Please sign in to comment.