diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:26 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:26 +0000 |
commit | 7f25bdff3a0fa55ba897964d5c82475b45f3325a (patch) | |
tree | 7190f1448161be6bfd163cdd88efee6101e1ae8c /methods/file.cc | |
parent | a9975068c7d55b2fbe46aacf94a36b460fd1d9da (diff) | |
download | apt-7f25bdff3a0fa55ba897964d5c82475b45f3325a.tar.gz |
Dsync merge
Author: jgg
Date: 1999-01-18 06:20:07 GMT
Dsync merge
Diffstat (limited to 'methods/file.cc')
-rw-r--r-- | methods/file.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/methods/file.cc b/methods/file.cc index 1b3183f05..f2bcf371a 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: file.cc,v 1.6 1998/11/14 01:39:49 jgg Exp $ +// $Id: file.cc,v 1.7 1999/01/18 06:20:08 jgg Exp $ /* ###################################################################### File URI method for APT @@ -37,7 +37,9 @@ bool FileMethod::Fetch(FetchItem *Itm) 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) |