diff options
Diffstat (limited to 'src/windows/classes/sun/awt/shell/Win32ShellFolder2.java')
-rw-r--r-- | src/windows/classes/sun/awt/shell/Win32ShellFolder2.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java b/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java index 765a9b496..0070bd445 100644 --- a/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java +++ b/src/windows/classes/sun/awt/shell/Win32ShellFolder2.java @@ -583,11 +583,18 @@ final class Win32ShellFolder2 extends ShellFolder { // Needs to be accessible to Win32ShellFolderManager2 static String getFileSystemPath(final int csidl) throws IOException, InterruptedException { - return invoke(new Callable<String>() { + String path = invoke(new Callable<String>() { public String call() throws IOException { return getFileSystemPath0(csidl); } }, IOException.class); + if (path != null) { + SecurityManager security = System.getSecurityManager(); + if (security != null) { + security.checkRead(path); + } + } + return path; } // NOTE: this method uses COM and must be called on the 'COM thread'. See ComInvoker for the details |