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