Skip to content

Commit

Permalink
Fix problem with zip_datafiles() when files in subdir
Browse files Browse the repository at this point in the history
- Fixes Issue rqtl#102
  • Loading branch information
kbroman committed Feb 16, 2019
1 parent 393b00f commit d5eb237
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: qtl2
Version: 0.18
Date: 2019-02-08
Version: 0.19-1
Date: 2019-02-16
Title: Quantitative Trait Locus Mapping in Experimental Crosses
Description: R/qtl2 provides a set of tools to perform quantitative
trait locus (QTL) analysis in experimental crosses. It is a
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## qtl2 0.19-1 (2019-02-16)

### Bug fixes

- Fix bug in `zip_datafiles()` when the files are in a subdirectory.
(See [Issue #102](https://github.com/rqtl/qtl2/issues/102).)


## qtl2 0.18 (2019-02-08)

### New features
Expand Down
5 changes: 3 additions & 2 deletions R/zip_datafiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ function(control_file, zip_file=NULL, overwrite=FALSE, quiet=TRUE)

dir <- dirname(control_file)

if(is.null(zip_file))
zip_file <- sub("\\.[a-z]+$", ".zip", control_file)
if(is.null(zip_file)) {
zip_file <- sub("\\.[a-z]+$", ".zip", basename(control_file))
}

# read control file
control <- read_control_file(control_file)
Expand Down

0 comments on commit d5eb237

Please sign in to comment.