Skip to content

Commit a0400b9

Browse files
authored
Update digestR.R
MultiplefileOpening errors correction
1 parent ee5a9d9 commit a0400b9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

R/digestR.R

+10-4
Original file line numberDiff line numberDiff line change
@@ -6001,7 +6001,7 @@ pseudo1D <- function(x){range(x)[which.max(abs(range(x)))]}
60016001
#' @seealso `createObj`, `dianaHead`, `log_message`, `myAssign`, `refresh`
60026002
#'
60036003
#' @export
6004-
# file_open <- function(fileName, ...){
6004+
# file_open <- function(fileName, ...){
60056005

60066006
# ## Create any/all of the digestR objects that are missing
60076007
# createObj()
@@ -10464,7 +10464,9 @@ myDir <- function(initialdir='', parent=NULL, title='', mustexist=TRUE){
1046410464
mustexist=mustexist))
1046510465

1046610466
## Save the selected (not canceled) directory
10467-
if (length(returnVal) && nzchar(returnVal)){
10467+
# if (length(returnVal) && nzchar(returnVal))
10468+
if (length(returnVal) > 0 && all(nzchar(returnVal)))
10469+
{
1046810470
returnVal <- gsub('\\', '/', returnVal, fixed=TRUE)
1046910471
pkgVar$prevDir <- returnVal
1047010472
myAssign("pkgVar", pkgVar, save.backup = FALSE)
@@ -10542,7 +10544,9 @@ myOpen <- function( defaultextension='', filetypes='', initialfile='',
1054210544
}
1054310545

1054410546
## Save the selected (not canceled) directory
10545-
if (length(returnVal) > 0 && nzchar(returnVal)){
10547+
# if (length(returnVal) > 0 && nzchar(returnVal))
10548+
if (length(returnVal) > 0 && all(nzchar(returnVal)))
10549+
{
1054610550
pkgVar$prevDir <- dirname(returnVal[1])
1054710551
myAssign("pkgVar", pkgVar, save.backup=FALSE)
1054810552
}
@@ -10608,7 +10612,9 @@ mySave <- function(defaultextension='', filetypes='', initialfile='',
1060810612
initialfile=initialfile))
1060910613

1061010614
## Save the selected (not canceled) directory
10611-
if (length(returnVal) > 0 && nzchar(returnVal)){
10615+
# if (length(returnVal) > 0 && nzchar(returnVal))
10616+
if (length(returnVal) > 0 && all(nzchar(returnVal)))
10617+
{
1061210618
pkgVar$prevDir <- dirname(returnVal[1])
1061310619
myAssign("pkgVar", pkgVar, save.backup=FALSE)
1061410620
}

0 commit comments

Comments
 (0)