Skip to content
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

DV-Uploader doesn't detect certain invalid filenames #12

Open
donsizemore opened this issue Apr 8, 2022 · 0 comments
Open

DV-Uploader doesn't detect certain invalid filenames #12

donsizemore opened this issue Apr 8, 2022 · 0 comments

Comments

@donsizemore
Copy link
Member

donsizemore commented Apr 8, 2022

Don't know if this is worth an issue (if not, close it), but if a certain careless user makes two mistakes:

  1. Forget to provide the source filename
  2. Include an invalid argument, in this case -list-only

DV-Uploader dutifully attempts to upload the last argument, even though I'd expect a file- nor directory name would ever begin with a dash:

java.io.FileNotFoundException: -list-only (The system cannot find the file specified)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at org.sead.uploader.util.FileResource.getInputStream(FileResource.java:125)
        at org.sead.uploader.dataverse.DVUploader.multipartDirectFileUpload(DVUploader.java:648)
        at org.sead.uploader.dataverse.DVUploader.uploadDatafile(DVUploader.java:409)
        at org.sead.uploader.AbstractUploader.uploadDatafile(AbstractUploader.java:454)
        at org.sead.uploader.AbstractUploader.processRequests(AbstractUploader.java:205)
        at org.sead.uploader.dataverse.DVUploader.main(DVUploader.java:120)
null

Again, feel free to give this the fabled "Moog" response.

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

1 participant