From 27aeb46c409a0fcd376528a205452b69473ec987 Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Tue, 27 Feb 2024 00:36:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=BC=20Cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/open/open.hpp | 2 +- src/open.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/open/open.hpp b/include/open/open.hpp index 01468a7..8541209 100644 --- a/include/open/open.hpp +++ b/include/open/open.hpp @@ -3,6 +3,6 @@ namespace Cool { /// Opens the link in the user's default web browser, or the folder in the folder explorer, or the file in the default configured software. -void open(const char* link); +void open(const char* link_or_path); } // namespace Cool \ No newline at end of file diff --git a/src/open.cpp b/src/open.cpp index 416f4a8..c92062c 100644 --- a/src/open.cpp +++ b/src/open.cpp @@ -9,9 +9,9 @@ #include namespace Cool { -void open(const char* link) +void open(const char* link_or_path) { - ShellExecuteA(nullptr, nullptr, link, nullptr, nullptr, SW_SHOW); + ShellExecuteA(nullptr, "open", link_or_path, nullptr, nullptr, SW_SHOWNORMAL); } } // namespace Cool @@ -22,9 +22,9 @@ void open(const char* link) #include namespace Cool { -void open(const char* link) +void open(const char* link_or_path) { - system((std::string{"xdg-open "} + link).c_str()); + system((std::string{"xdg-open "} + link_or_path).c_str()); } } // namespace Cool @@ -35,9 +35,9 @@ void open(const char* link) #include namespace Cool { -void open(const char* link) +void open(const char* link_or_path) { - system((std::string{"open "} + link).c_str()); + system((std::string{"open "} + link_or_path).c_str()); } } // namespace Cool