Skip to content

Commit

Permalink
Fixed path argument in projects()
Browse files Browse the repository at this point in the history
  • Loading branch information
Krieger committed Jun 15, 2020
1 parent ac0c8d1 commit ed1cf25
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: projects
Title: A Project Infrastructure for Researchers
Version: 2.1.1
Version: 2.1.2
Authors@R:
c(person(given = "Nik",
family = "Krieger",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
@@ -1,4 +1,9 @@

# projects 2.1.2

## Minor updates:
- Bug fix to `projects()`'s handling of the `path` argument, accommodating latest behavior of `fs::path_abs()`.

# projects 2.1.1

## Minor updates:
Expand Down
8 changes: 5 additions & 3 deletions R/getters.R
Expand Up @@ -277,9 +277,11 @@ projects <- function(project,

if (!is.null(path)) {

if (!fs::path_has_parent(path, p_path)) {
path <- fs::path(p_path, path)
}
path <- fs::path_abs(path, p_path)

# if (!fs::path_has_parent(path, p_path)) {
# path <- fs::path(p_path, path)
# }

if (!fs::dir_exists(path)) {
warning("\nThe directory:\n", path, "\ndoes not exist.")
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
@@ -1,4 +1,9 @@

## Update to version 2.1.2
There were no ERRORs, WARNINGs.

NOTE on some platforms objecting to `methods` being in the `Imports` list.

## Update to version 2.1.1
There were no ERRORs, WARNINGs.

Expand Down

0 comments on commit ed1cf25

Please sign in to comment.