Skip to content

Commit

Permalink
minor fix for dry_run with postprocessing v0.16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondben committed Sep 11, 2024
1 parent 1c3551b commit 8b4ca32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bowerbird
Type: Package
Title: Keep a Collection of Sparkly Data Resources
Version: 0.16.1
Version: 0.16.2
Authors@R: c(person("Ben", "Raymond", email = "ben.raymond@aad.gov.au", role = c("aut", "cre")),
person("Michael", "Sumner", role = "aut"),
person("Miles", "McBain", email = "miles.mcbain@gmail.com", role = c("rev", "ctb")),
Expand Down
4 changes: 2 additions & 2 deletions R/postprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ find_changed_files <- function(file_list_before, file_list_after, filename_patte
## detect changes on basis of ctime and size attributes
## returns names only
## discard any files that don't actually exist
file_list_before <- file_list_before[file.exists(rownames(file_list_before)), ]
file_list_after <- file_list_after[file.exists(rownames(file_list_after)), ]
if (nrow(file_list_before) > 0) file_list_before <- file_list_before[file.exists(rownames(file_list_before)), ]
if (nrow(file_list_after) > 0) file_list_after <- file_list_after[file.exists(rownames(file_list_after)), ]
changed_files <- setdiff(rownames(file_list_after), rownames(file_list_before)) ## anything that has appeared afterwards
for (thisf in intersect(rownames(file_list_after), rownames(file_list_before))) {
## files in both
Expand Down
3 changes: 1 addition & 2 deletions R/sync.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ do_sync_repo <- function(this_dataset,create_root,verbose,settings,confirm_downl
## note that file paths returned by the handler are relative to the local_file_root
## if we are doing a dry run, no postprocessing
if (dry_run) {
file_list_before <- character()
file_list_after <- character()
file_list_before <- file_list_after <- data.frame()
} else {
## all files go into both file_list_after and file_list_before
file_list_before <- file.info(file.path(bb_settings(this_dataset)$local_file_root, method_loot$files[[1]]$file))
Expand Down

0 comments on commit 8b4ca32

Please sign in to comment.