Page 1 of 1

macOS install creating Parent folder for FileBot

Posted: 02 Aug 2022, 15:38
by cheaters
Small issue fixed by removing the parent folder but wanted to mention it...

I think I have seen this in the past, but not recently.

Today I installed FileBot from the package [*]FileBot_4.9.6_x64.pkg and it created a parent folder named FileBot. Because of this the filebot alias at /usr/local/bin/filebot was not working.


Image

Re: macOS install creating Parent folder for FileBot

Posted: 02 Aug 2022, 15:58
by rednoah
macOS sometimes does that, not sure if it's a bug or a feature. Unfortunately, our *.pkg doesn't get to decide what macOS does. But if someone can reliably reproduce this behaviour, and find a workaround, then I'm all ears.

Re: macOS install creating Parent folder for FileBot

Posted: 02 Aug 2022, 16:14
by cheaters

Re: macOS install creating Parent folder for FileBot

Posted: 02 Aug 2022, 20:22
by rednoah
I'll look into it. The link above seems to be fairly unrelated to the problem at hand at first glance though.

Re: macOS install creating Parent folder for FileBot

Posted: 03 Aug 2022, 00:59
by cheaters
Thanks. I know it's low priority.

The accepted answer says something about
Enforce the Location with BundleIsRelocatable
https://apple.stackexchange.com/a/219144/40153

Re: macOS install creating Parent folder for FileBot

Posted: 03 Aug 2022, 09:45
by rednoah
Look closely at the log output from Installer.app or installer; you will see entries regarding the search and final location of the relocated application.
:?: What does the installer log say?


:?: Did you manually create the /Applications/FileBot/ folder and then move the FileBot.app file into that, and then install FileBot again? Because then BundleIsRelocatable would indeed make sure to update FileBot into the manually created folder path.


:idea: Presumably, BundleIsRelocatable is default behaviour so that users can take the FileBot.app and move it somewhere and then have updates install into the new manually created folder path. I don't know if it can serve as a work around for the issues described in the OP as well, but according to my understanding, you never moved FileBot.app and yet macOS decided to create a /Applications/FileBot/ folder, so that seems to be significantly different.


:idea: Notably, the /usr/local/bin/filebot link is created by the postinstall script and so even if macOS decides to install the app bundle elsewhere, it should still be linked correctly, unless macOS installer itself doesn't give us the correct installation path, so this is certainly a mysterious one:

Code: Select all

# $2: Full path to the installation destination.
# For example: /Applications
ln -sf "$2/FileBot.app/Contents/MacOS/filebot.sh" "/usr/local/bin/filebot"