eirikbakke commented on PR #5027: URL: https://github.com/apache/netbeans/pull/5027#issuecomment-1640373414
Recap of this PR: 1) On Windows, if the user moves the NetBeans install directory, NetBeans will fail to start, because the cache directory contains some absolute paths to files in the NetBeans install directory. This is a bug, because the cache directory is not supposed to contain absolute paths (we know this since @jtulach once wrote a testCachesDontUseAbsolutePaths test). 2) The fix to the bug in (1) would be to eliminate the absolute paths, but I looked into that and couldn't figure out how. 3) This PR takes a different approach: Just make sure the cache directory gets invalidated whenever the installation path changes. I think that's a good idea in any case; moving the install directory is a rare occurrence, except maybe if running from a USB drive where drive letters change or such. 4) As it happens, this PR itself fails the testCachesDontUseAbsolutePaths test because the invalidation is done by adding the absolute install path to the all-checksum.txt file. But I can just make it pass by allowing that particular occurrence of the absolute path, in all-checksum.txt only. Unless @jtulach disagrees, my inclination here would be to fix the failing test by adjusting testCachesDontUseAbsolutePaths to allow the absolute path in all-checksum.txt . The main possible objection here would be in giving up the "feature" of being able to move the NetBeans install directory without invalidating the cache directory. (I think that's acceptable, in return for eliminating a whole class of bugs that make NetBeans permanently un-startable.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
