diff options
author | Teddy Wing | 2018-09-05 19:57:58 +0200 |
---|---|---|
committer | Teddy Wing | 2018-09-05 19:57:58 +0200 |
commit | 8c20b1ce79316ccda8dd2c91c66f2388f16c45bf (patch) | |
tree | 802f8105344ad9daa01ac3b6ffa8f645fd39f204 /CopyMailto/main.m | |
parent | 83b7beb0c532a199e606d7ba05ffc38ea7e2cd7f (diff) | |
download | Copy-Mailto-8c20b1ce79316ccda8dd2c91c66f2388f16c45bf.tar.bz2 |
DefaultURLHandler: Add `saveDefaultURLHandler`
This method is supposed to set CopyMailto as the default application for
"mailto" URLs. But it keeps giving me a `-54` error, or `202` status
code on the shell. WTF is going on?
Diffstat (limited to 'CopyMailto/main.m')
-rw-r--r-- | CopyMailto/main.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CopyMailto/main.m b/CopyMailto/main.m index 8dfe2c1..e61f04e 100644 --- a/CopyMailto/main.m +++ b/CopyMailto/main.m @@ -11,6 +11,9 @@ #import "DefaultURLHandler.h" int main(int argc, const char * argv[]) { - [DefaultURLHandler saveDefaultURLHandler]; + if (argc == 2 && strcmp(argv[1], "--set-url-handler") == 0) { + return [DefaultURLHandler setDefaultURLHandler]; + } + return NSApplicationMain(argc, argv); } |