From f0c92be31a92413157cb28f2da13c05f8eaad188 Mon Sep 17 00:00:00 2001 From: Andrie Date: Mon, 2 Sep 2019 18:20:01 +0100 Subject: [PATCH] Remove any duplicated nodes #272 --- R/drive_reveal_path.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/drive_reveal_path.R b/R/drive_reveal_path.R index eab20dfb3..4d365dc5f 100644 --- a/R/drive_reveal_path.R +++ b/R/drive_reveal_path.R @@ -54,7 +54,8 @@ dribble_from_path <- function(path = NULL, ## nodes = files with names implied by our paths + all folders nodes <- get_nodes(path, team_drive, corpus) if (nrow(nodes) == 0) return(dribble_with_path()) - + ## remove any duplicated nodes + nodes <- nodes[!duplicated(nodes$id), ] ROOT_ID <- root_id() x <- purrr::map(path, ~pathify_one_path(.x, nodes, ROOT_ID))