Skip to content

Commit

Permalink
Update vendor/cget
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed May 5, 2024
1 parent 89052ad commit f13d561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

// pqrs::osx::launch_services v1.0
// pqrs::osx::launch_services v1.1

// (C) Copyright Takayama Fumihiko 2022.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
// (See https://www.boost.org/LICENSE_1_0.txt)

#include "launch_services/status.hpp"
#include <pqrs/cf/string.hpp>
Expand All @@ -13,13 +13,13 @@ namespace pqrs {
namespace osx {
namespace launch_services {

inline status register_application(const std::string& path) {
inline status register_application(const std::string& path, bool update = true) {
if (auto cf_path = pqrs::cf::make_cf_string(path)) {
if (auto url = CFURLCreateWithFileSystemPath(nullptr,
*cf_path,
kCFURLPOSIXPathStyle,
true)) {
auto s = LSRegisterURL(url, true);
auto s = LSRegisterURL(url, update);
CFRelease(url);

return s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// (C) Copyright Takayama Fumihiko 2022.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
// (See https://www.boost.org/LICENSE_1_0.txt)

#include <CoreServices/CoreServices.h>
#include <iostream>
Expand Down

0 comments on commit f13d561

Please sign in to comment.