X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/30c8107e9c56d7d78dcf9136f94aeed9d631dfb3..8d1cb6da6e21302c654da3f09de3975af7e4a11f:/methods/file.cc?ds=sidebyside diff --git a/methods/file.cc b/methods/file.cc index 4e3410078..5cbf1924e 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -15,7 +15,6 @@ // Include Files /*{{{*/ #include -#include #include #include #include @@ -98,7 +97,7 @@ bool FileMethod::Fetch(FetchItem *Itm) { if (APT::String::Endswith(File, *ext) == true) { - std::string const unfile = File.substr(0, File.length() - ext->length() - 1); + std::string const unfile = File.substr(0, File.length() - ext->length()); if (stat(unfile.c_str(),&Buf) == 0) { AltRes.Size = Buf.st_size; @@ -129,8 +128,5 @@ bool FileMethod::Fetch(FetchItem *Itm) int main() { - setlocale(LC_ALL, ""); - - FileMethod Mth; - return Mth.Run(); + return FileMethod().Run(); }