Skip to content

When drag and drop to copy pdf folder is created #4087

@teun95

Description

@teun95

JabRef 4.3-dev--snapshot--2018-05-28--master--bf7fb5168
Linux 4.14.47-1-manjaro amd64
Manjaro GNOME Edition (17.1.10)
Java 1.8.0_172

When I drop a pdf file on a reference and attach it, a folder is attached with the chosen name instead of the file. This only happens when choosing to copy the pdf, moving works as expected.

Steps to reproduce:

  1. Drag PDF to reference from nautilus
  2. Choose "only attach PDF"
  3. Choose "copy file to directory" and accept the suggested renaming
  4. Accept the following popup
  5. There is a folder in the default pdf location with the name of the pdf file. In jabjref it looks like a pdf is attached, but opening it results in an error as expected.
Log File
21:12:07.156 [JabRef CachedThreadPool] ERROR org.jabref.logic.util.io.FileUtil - Copying Files failed.
java.nio.file.FileSystemException: /mnt/3TB/cloud/username/Work/Academicmaterial/jabref/Goldgeier2001.pdf: Is a directory
  at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[?:1.8.0_172]
  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_172]
  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_172]
  at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:1.8.0_172]
  at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434) ~[?:1.8.0_172]
  at java.nio.file.Files.newOutputStream(Files.java:216) ~[?:1.8.0_172]
  at java.nio.file.Files.write(Files.java:3292) ~[?:1.8.0_172]
  at org.jabref.logic.util.io.FileUtil.copyFile(FileUtil.java:164) ~[Jabref.jar:?]
  at org.jabref.gui.externalfiles.DroppedFileHandler.doCopy(DroppedFileHandler.java:559) ~[Jabref.jar:?]
  at org.jabref.gui.externalfiles.DroppedFileHandler.linkPdfToEntry(DroppedFileHandler.java:207) ~[Jabref.jar:?]
  at org.jabref.gui.externalfiles.DroppedFileHandler.linkPdfToEntry(DroppedFileHandler.java:174) ~[Jabref.jar:?]
  at org.jabref.pdfimport.PdfImporter.importPdfFilesInternal(PdfImporter.java:134) ~[Jabref.jar:?]
  at org.jabref.pdfimport.PdfImporter.importPdfFiles(PdfImporter.java:88) ~[Jabref.jar:?]
  at org.jabref.gui.groups.EntryTableTransferHandler.lambda$handleDraggedFiles$0(EntryTableTransferHandler.java:306) ~[Jabref.jar:?]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_172]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_172]
  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions