Skip to content

Commit 14fc45b

Browse files
committed
fix: use && instead of | in dbfile.move file type check
| always evaluates true here so the error block fires for every valid input. && correctly requires both conditions.
1 parent 438c96f commit 14fc45b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

base/db/R/dbfiles.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ dbfile.move <- function(old.dir, new.dir, file.type, siteid = NULL, register = F
766766
files.indb <- 0
767767

768768
# check for file type and update to make it *.file type
769-
if (file.type != "clim" | file.type != "nc") {
769+
if (file.type != "clim" && file.type != "nc") {
770770
PEcAn.logger::logger.error("File type not supported by move at this time. Currently only supports NC and CLIM files")
771771
error <- 1
772772
}

0 commit comments

Comments
 (0)