Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue #1961: tidy unzip directory #1962

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions R/course.R
Expand Up @@ -529,10 +529,14 @@ top_directory <- function(filenames) {
in_top <- path_dir(filenames) == "."
unique_top <- unique(filenames[in_top])
is_directory <- grepl("/$", unique_top)
if (length(unique_top) > 1 || !is_directory) {
NA_character_
if(length(unique(path_dir(filenames)))==1 & length(unique_top) == 0){
burnsal marked this conversation as resolved.
Show resolved Hide resolved
unique_top <- unique(path_dir(filenames))
} else {
unique_top
if (length(unique_top) > 1 || !is_directory) {
NA_character_
} else {
unique_top
}
}
}

Expand Down