summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:59:08 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:59:08 +0000
commit171c45bcc2a0a59db27f6bfc142efdd466cdd8bc (patch)
treee7554f69ae3bf5d1a2a55021aeb1fb5168feb183 /ftparchive
parentc9aa0f15b7cc32336e257303fcdb64503ed1c6df (diff)
Correct neuros problem with no source directory
Author: jgg Date: 2002-04-24 05:02:40 GMT Correct neuros problem with no source directory
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/writer.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index a4877d635..b3ee49c75 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: writer.cc,v 1.4 2001/06/26 02:50:27 jgg Exp $
+// $Id: writer.cc,v 1.5 2002/04/24 05:02:40 jgg Exp $
/* ######################################################################
Writer
@@ -603,10 +603,10 @@ bool SourcesWriter::DoPackage(string FileName)
NewFileName = OriginalPath;
if (PathPrefix.empty() == false)
NewFileName = flCombine(PathPrefix,NewFileName);
-
+
string Directory = flNotFile(OriginalPath);
string Package = Tags.FindS("Source");
-
+
// Perform the delinking operation over all of the files
string ParseJnk;
const char *C = Files;
@@ -633,7 +633,7 @@ bool SourcesWriter::DoPackage(string FileName)
Directory = flNotFile(NewFileName);
if (Directory.length() > 2)
Directory.erase(Directory.end()-1);
-
+
// This lists all the changes to the fields we are going to make.
// (5 hardcoded + maintainer + end marker)
TFRewriteData Changes[5+1+SOverItem->FieldOverride.size()+1];
@@ -641,7 +641,8 @@ bool SourcesWriter::DoPackage(string FileName)
unsigned int End = 0;
SetTFRewriteData(Changes[End++],"Source",Package.c_str(),"Package");
SetTFRewriteData(Changes[End++],"Files",Files);
- SetTFRewriteData(Changes[End++],"Directory",Directory.c_str());
+ if (Directory != "./")
+ SetTFRewriteData(Changes[End++],"Directory",Directory.c_str());
SetTFRewriteData(Changes[End++],"Priority",BestPrio.c_str());
SetTFRewriteData(Changes[End++],"Status",0);