qPharmetra / qpToolkit

Tools for population PK modeling, visualization, and reporting
Other
1 stars 1 forks source link

nm.unzip should not change working directory #16

Closed jtchittenden closed 4 years ago

jtchittenden commented 5 years ago

Fails in some calls, like get.covmat. Just set the path into the filename.

bergsmat commented 4 years ago

Interestingly, nm.unzip currently changes working directory to 'path' AND prepends 'path' to zip.filename by default; then executes unzip with zip.filename as an argument. However, the prepend happens by default; if default is over-ridden by supplying zip.file directly, it will not occur. Or if 'path' is specified absolutely, the default could work regardless of current directory. In the current code base, run, path, and extension are always supplied; so filename and zip.filename are always calculated. Therefore it must be the case that path is routinely specified absolutely. Indeed, getOption('qpExampleDir') returns an absolute path on windows. iss16 branch drops all changes of directory in nm.unzip.