diff --git a/R/course.R b/R/course.R index 7ba4f0c02..ce2389576 100644 --- a/R/course.R +++ b/R/course.R @@ -529,7 +529,7 @@ top_directory <- function(filenames) { in_top <- path_dir(filenames) == "." unique_top <- unique(filenames[in_top]) is_directory <- grepl("/$", unique_top) - if(length(unique(path_dir(filenames)))==1 & length(unique_top) == 0){ + if (length(unique(path_dir(filenames))) == 1 && length(unique_top) == 0) { unique_top <- unique(path_dir(filenames)) } else { if (length(unique_top) > 1 || !is_directory) {