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

cannot open folder shortcuts on Windows #395

Closed
jcharlet opened this issue Feb 21, 2020 · 2 comments
Closed

cannot open folder shortcuts on Windows #395

jcharlet opened this issue Feb 21, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@jcharlet
Copy link
Contributor

jcharlet commented Feb 21, 2020

Issue

reported by @paulyoung84 on Windows 10 using JRE bundle version (Java 11)

on first test (just loading a profile) it works fine for most folders, but selecting a folder from top level, like through libraries or folder on my desktop it seems to struggle. tries to load but files don't appear in window.

Further investigation

as observed with @sparkhi , seems to happen on shortcuts of network folders, typically "Libraries" or "Desktop" when taken from the top level in file hierarchy. But when you browse to the right drive without using the library, e.g. H:/users/username/Desktop, it works fine.

on 6.4, it does work but the name of folder is weird: "::{12342134}" instead of "Libraries".

on 6.5, it does not work indeed, and the following stacktrace appears in the logs:

Exception in thread "AWT-EventQueue-0" java.nio.file.InvalidPathException: Illegal char <:> at index 0: ::{031E4825-7B94-4DC3-B131-E946B44C8DD5}
        at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at java.base/java.io.File.toPath(Unknown Source)
        at uk.gov.nationalarchives.droid.gui.action.AddFilesAndFoldersAction.add(AddFilesAndFoldersAction.java:92)
        at uk.gov.nationalarchives.droid.gui.DroidMainFrame.jButtonAddFileActionPerformed(DroidMainFrame.java:1367)
        at uk.gov.nationalarchives.droid.gui.DroidMainFrame$10.actionPerformed(DroidMainFrame.java:543)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
        at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
        at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.desktop/java.awt.Component.processEvent(Unknown Source)
        at java.desktop/java.awt.Container.processEvent(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.openide.util.RequestProcessor$TopLevelThreadGroup (file:/C:/droid65/lib/org-openide-util-RELEASE112.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of org.openide.util.RequestProcessor$TopLevelThreadGroup
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Context

File AddFilesAndFoldersAction last modified since 6.4 in commit 0d3cbe2 Refactor to make use of Java NIO.2, also we now buffer I/O to improve performance Adam Retter 27/06/2017, 00:44 from PR #167

couldn't run the GUI on that PR, because of a bug;
but could run GUI on 971e542 following that PR #167, fixing bug in previous.

@jcharlet jcharlet added the bug label Feb 21, 2020
@jcharlet jcharlet added this to the 6.5 milestone Feb 21, 2020
@jcharlet jcharlet added this to Backlog in DROID Kanban board 6.5 via automation Feb 21, 2020
@jcharlet jcharlet changed the title cannot open network folders on Windows cannot open folder shortcuts on Windows Feb 21, 2020
@jcharlet
Copy link
Contributor Author

jcharlet commented Mar 2, 2020

another surely related issue: crashes on forbidden folders now, reproduced on Windows (can add a folder, but crashes on running profile) and linux (cannot add a forbidden folder like /root, crashes immediately).

@jcharlet
Copy link
Contributor Author

jcharlet commented Mar 2, 2020

works fine on linux symlinks: if folder it actually checks the folder recursively as if it was a normal folder

@jcharlet jcharlet closed this as completed Mar 6, 2020
DROID Kanban board 6.5 automation moved this from Backlog to Done Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants