// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: file.cc,v 1.5 1998/11/01 05:27:41 jgg Exp $
+// $Id: file.cc,v 1.7 1999/01/18 06:20:08 jgg Exp $
/* ######################################################################
File URI method for APT
public:
- FileMethod() : pkgAcqMethod("1.0",SingleInstance) {};
+ FileMethod() : pkgAcqMethod("1.0",SingleInstance | LocalOnly) {};
};
// FileMethod::Fetch - Fetch a file /*{{{*/
URI Get = Itm->Uri;
string File = Get.Path;
FetchResult Res;
-
+ if (Get.Host.empty() == false)
+ return _error->Error("Invalid URI, local URIS must not start with //");
+
// See if the file exists
struct stat Buf;
if (stat(File.c_str(),&Buf) == 0)