diff --git a/NanaGet/NanaGetCore.cpp b/NanaGet/NanaGetCore.cpp index b0d3af8..621759c 100644 --- a/NanaGet/NanaGetCore.cpp +++ b/NanaGet/NanaGetCore.cpp @@ -25,7 +25,6 @@ #undef GetObject -#include #include #include #include @@ -132,7 +131,6 @@ namespace NanaGet namespace winrt { - using Windows::ApplicationModel::Package; using Windows::Storage::ApplicationData; using Windows::Storage::Streams::IBuffer; using Windows::Web::Http::HttpResponseMessage; @@ -155,24 +153,6 @@ std::filesystem::path NanaGet::GetApplicationFolderPath() return CachedResult; } -bool NanaGet::IsPackagedMode() -{ - static bool CachedResult = ([]() -> bool - { - try - { - const auto CurrentPackage = winrt::Package::Current(); - return true; - } - catch (...) - { - return false; - } - }()); - - return CachedResult; -} - std::filesystem::path NanaGet::GetSettingsFolderPath() { static std::filesystem::path CachedResult = ([]() -> std::filesystem::path @@ -191,7 +171,7 @@ std::filesystem::path NanaGet::GetSettingsFolderPath() nullptr, &RawFolderPath)); FolderPath = std::filesystem::path(RawFolderPath); - if (!NanaGet::IsPackagedMode()) + if (!Mile::WinRT::IsPackagedMode()) { FolderPath /= L"M2-Team\\NanaGet"; } diff --git a/NanaGet/NanaGetCore.h b/NanaGet/NanaGetCore.h index 5d130da..720e785 100644 --- a/NanaGet/NanaGetCore.h +++ b/NanaGet/NanaGetCore.h @@ -39,8 +39,6 @@ namespace NanaGet { std::filesystem::path GetApplicationFolderPath(); - bool IsPackagedMode(); - std::filesystem::path GetSettingsFolderPath(); std::filesystem::path GetDownloadsFolderPath();