Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 283070 Details for
Bug 563697
Regression in canWrite() for location where access cannot be determined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch that reintroduces old test as fallback
org.eclipse.equinox.launcher_patch1_reintroduce_old_test.patch (text/plain), 1.18 KB, created by
Mikael Sterner
on 2020-05-29 02:50:39 EDT
(
hide
)
Description:
Patch that reintroduces old test as fallback
Filename:
MIME Type:
Creator:
Mikael Sterner
Created:
2020-05-29 02:50:39 EDT
Size:
1.18 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java >index 1445719..2493974 100644 >--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java >+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java >@@ -1287,7 +1287,25 @@ > } > > private static boolean canWrite(File installDir) { >- return installDir.isDirectory() && Files.isWritable(installDir.toPath()); >+ if (!installDir.isDirectory()) >+ return false; >+ >+ if (Files.isWritable(installDir.toPath())) >+ return true; >+ >+ File fileTest = null; >+ try { >+ // we use the .dll suffix to properly test on Vista virtual directories >+ // on Vista you are not allowed to write executable files on virtual directories like "Program Files" >+ fileTest = File.createTempFile("writableArea", ".dll", installDir); //$NON-NLS-1$ //$NON-NLS-2$ >+ } catch (IOException e) { >+ //If an exception occured while trying to create the file, it means that it is not writtable >+ return false; >+ } finally { >+ if (fileTest != null) >+ fileTest.delete(); >+ } >+ return true; > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 563697
: 283070 |
283071
|
283072
|
283073
|
283074
|
283075