8000 7zip is stored in directory not indicated by nhdR:::has_7zip · Issue #94 · jsta/nhdR · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

7zip is stored in directory not indicated by nhdR:::has_7zip #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LZarri opened this issue Feb 7, 2025 · 1 comment
Open

7zip is stored in directory not indicated by nhdR:::has_7zip #94

LZarri opened this issue Feb 7, 2025 · 1 comment

Comments

@LZarri
Copy link
LZarri commented Feb 7, 2025

My 7zip is installed on a server under /programs/7zip/7zz , rather than in ~/usr/bin/7z or other path files indicated in has_7z . Is there a way to point R to the proper 7z, or should it be an alteration of your has_7z script such as:


has_7z <- function(string) { # This would need to be modified so that an empty path wouldn't break the script
  paths_7z <- c("7z",
    path.expand("~/usr/bin/7z"),
    string,
    "C:\\PROGRA~1\\7-Zip\\7za",
    "C:\\PROGRA~1\\7-Zip\\7z.exe")
  if (!any(nchar(Sys.which(paths_7z)) > 0)) {
    list(yes = FALSE, path = NA)
  } else {
    list(yes = TRUE, path = paths_7z[nchar(Sys.which(paths_7z)) > 0][1])
  }
}

has_7z('/programs/7zip/7zz')
@jsta
Copy link
Owner
jsta commented Feb 9, 2025

Yes, that's an excellent idea to pass a string argument to specify a 7z path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0