Skip to content

Commit

Permalink
Bug fix: Thunderbird unable to connect to Sync Clippings Helper on macOS
Browse files Browse the repository at this point in the history
(issue #11)
  • Loading branch information
aecreations committed Oct 27, 2021
1 parent b190692 commit 5619aeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/macos-pkg/Resources/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fi

# Perform additional cleanup
echo "Deleting configuration files"
nativeManifestFile=~/Library/Application\ Support/Mozilla/NativeMessagingHosts/syncClippings.json
nativeManifestFile=/Library/Application\ Support/Mozilla/NativeMessagingHosts/syncClippings.json
rm -f "$nativeManifestFile"

configFiles=~/Library/Preferences/syncClippings.*
Expand Down
4 changes: 2 additions & 2 deletions src/macos-pkg/scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ checkConfFile() {
}

writeNativeManifest() {
nativeManifestDir=~/Library/Application\ Support/Mozilla/NativeMessagingHosts
nativeManifestDir=/Library/Application\ Support/Mozilla/NativeMessagingHosts

local nativeManifestFile="${nativeManifestDir}/${nativeManifestFilename}"
local exePath="$installPath/$exeFilename"
Expand All @@ -44,8 +44,8 @@ EOF
}

main() {
checkConfFile
writeNativeManifest
checkConfFile

echo "Post installation successfully completed"
}
Expand Down
10 changes: 5 additions & 5 deletions src/syncClippings-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ EOF

writeNativeManifest() {
if [ $os = "Darwin" ]; then
nativeManifestDir=~/Library/Application\ Support/Mozilla/NativeMessagingHosts
nativeManifestDir=/Library/Application\ Support/Mozilla/NativeMessagingHosts
else
nativeManifestDir=~/.mozilla/native-messaging-hosts
nativeManifestDir=/usr/lib/mozilla/native-messaging-hosts
fi

local nativeManifestFile="${nativeManifestDir}/${nativeManifestFilename}"
Expand All @@ -415,10 +415,10 @@ writeNativeManifest() {
# Check if the native manifest directory exists; if not, then create it.
test -d "$nativeManifestDir"
if [ $? -ne 0 ]; then
mkdir -pv "$nativeManifestDir"
sudo mkdir -pv "$nativeManifestDir"
fi

cat << EOF > "$nativeManifestFile"
sudo bash -c "cat > \"$nativeManifestFile\"" << EOF
{
"name": "syncClippings",
"description": "Sync Clippings",
Expand Down Expand Up @@ -448,8 +448,8 @@ main() {
echo "Starting installation."

writeExecFile
writeConfFile
writeNativeManifest
writeConfFile

echo

Expand Down

0 comments on commit 5619aeb

Please sign in to comment.