Skip to content

Commit

Permalink
only check basename for dups
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Jul 29, 2024
1 parent 917cb34 commit a609fa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_nhdplushr.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ get_nhdplushr <- function(hr_dir, out_gpkg = NULL,
gdbs <- list.files(hr_dir, pattern = "sub.gpkg", full.names = TRUE)
}

dup_list_key <- regmatches(gdbs, regexpr("[0-9][0-9][0-9][0-9]", gdbs))
dup_list_key <- regmatches(basename(gdbs), regexpr("[0-9][0-9][0-9][0-9]", basename(gdbs)))

if(any(duplicated(dup_list_key))) {
remove <- gdbs[duplicated(dup_list_key)]
Expand Down

0 comments on commit a609fa7

Please sign in to comment.