RFR: JDK-8264403: [macos]: App names containing '.' characters results in an error message when launching [v2]
Andy Herrick
herrick at openjdk.java.net
Thu Apr 1 12:14:40 UTC 2021
On Wed, 31 Mar 2021 21:59:55 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> Andy Herrick has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8264403: [macos]: App names containing '.' characters results in an error message when launching
>
> src/jdk.jpackage/share/native/common/FileUtils.h line 76:
>
>> 74:
>> 75: // extract the name from the launcher path
>> 76: tstring extractName(const tstring& path);
>
> Function name seems to be misleading.
> If it specifically designed to be applied to executables, I'd name it `stripExecutableSuffix()`. On Unix implementation would return passed in string as is without calling `basename()` and on Windows would just strip ".exe" suffix not calling `basename()` either.
> The use would be: `FileUtils::mkpath() << appDirPath << (FileUtils::stripExecutableSuffix(FileUtils::basename(launcherPath)) + _T(".cfg"));`
makes sense - updated as requested
-------------
PR: https://git.openjdk.java.net/jdk/pull/3288
More information about the core-libs-dev
mailing list