| Summary: | Branding of MacOS eclipse.ini fails on case insensitive filesystem (Windows) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Michal Ruzicka <michal.ruza> | ||||
| Component: | Buckminster | Assignee: | buckminster.core-inbox <buckminster.core-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | a.wehner, philippn, thomas | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 178892 [details]
org.eclipse.buckminster.pde-ini_branding.patch
The attached trivial patch should resolve the issue.
Patch looks good. Please commit to helios-maintenance branch. patch committed to the helios-maintenance branch in revision 11581 *** Bug 325674 has been marked as a duplicate of this bug. *** |
The following code in org.eclipse.buckminster.pde.tasks.BrandingIron.copyMacIni() does not consider case insensitive filesystems: File ini = getCanonicalFile(new File(initialRoot, "/MacOS/eclipse.ini")); File ini2 = getCanonicalFile(new File(initialRoot, "/MacOS/Eclipse.ini")); ... if (ini.exists()) { if (ini2.exists()) { logger.warning("Found both %s and %s. Discarding the latter", ini.getAbsolutePath(), ini2.getAbsolutePath()); //$NON-NLS-1$ ini2.delete(); // This should not happen really } } else if (ini2.exists()) { ini = ini2; } else return; ... StringBuffer buffer; try { buffer = readFile(ini); } catch (IOException e) { logger.error(e, "Impossible to brand ini file"); //$NON-NLS-1$ return; } When the MacOS/eclipse.ini file happens to exist in a case insensitive filesystem then both the warning and the error message from the above code excerpt are printed. The reason is that ini and ini2 files are in fact identical on a case insensitive filesystem, so if ini exists then ini2 must exists too (as it is the same file). The code above misinterprets this and reacts with deletion of the ini2 file (and thus whit deletion of ini). Which is later manifested by the error message when an attempt is made to read the deleted ini file.