]> git.saurik.com Git - apt.git/blobdiff - methods/aptmethod.h
eipp: properly handle arch-specific provides
[apt.git] / methods / aptmethod.h
index cf3496e4547c2ada2b2f990f23ecd0296eadf3b0..bef61a8bc6c8a32a60952cf3c5af9233832d5087 100644 (file)
@@ -46,7 +46,11 @@ public:
    aptMethod(char const * const Binary, char const * const Ver, unsigned long const Flags) :
       pkgAcqMethod(Ver, Flags), Binary(Binary)
    {
-      std::locale::global(std::locale(""));
+      try {
+        std::locale::global(std::locale(""));
+      } catch (...) {
+        setlocale(LC_ALL, "");
+      }
    }
 };