~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/src/PathManager.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
  // determine the destination path and call addFile with two args
167
167
  std::ostringstream path;
168
168
  bool have_dest = getDestinationPath (file.name (), path);
169
 
  path << std::ends;
170
169
  string dest_path = path.str ();
171
170
  return addFile (file, have_dest ? dest_path.c_str () : "<unused-dest-name>");
172
171
}
304
303
    // Test whether entry is a directory.
305
304
    if (fi.is_dir ())
306
305
      traverse (name); // Dive into the sub-directory.
307
 
    else
 
306
    else {
308
307
      // File entry found.
309
 
      addFile (name);
 
308
      if (strncmp (name, "./", 2) == 0)
 
309
        addFile (name + 2);
 
310
      else
 
311
        addFile (name);
 
312
    }
310
313
    delete[] name;
311
314
  }
312
315
  
370
373
bool PathManager::getDestinationPath (const char *filename, ostream &out) const {
371
374
  std::ostringstream rest;
372
375
  const char *dir = getDestination (filename, &rest);
373
 
  rest << std::ends;
374
376
  if (dir) {
375
377
    out << dir;
376
378
    if (dir [strlen (dir) - 1] != '/')