From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:21 +0000 (+0000) Subject: More cleanup X-Git-Tag: 0.7.24ubuntu1~1526 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/735a058b1698321093d5ed20ed1ef5f5368038b7?hp=b7d9b68ecea1fb31744f42929192e04e56c53d44 More cleanup Author: jgg Date: 1998-12-22 08:41:20 GMT More cleanup --- diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index a413b109f..c21d0cbc0 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cdrom.cc,v 1.13 1998/12/09 05:57:17 jgg Exp $ +// $Id: apt-cdrom.cc,v 1.14 1998/12/22 08:41:20 jgg Exp $ /* ###################################################################### APT CDROM - Tool for handling APT's CDROM database. @@ -908,15 +908,22 @@ bool DoAdd(CommandLine &) { Name = PromptLine(""); if (Name.empty() == false && + Name.find('"') == string::npos && + Name.find(':') == string::npos && Name.find('/') == string::npos) break; cout << "That is not a valid name, try again " << endl; - } - + } } } else Name = Database.Find("CD::" + ID); + + string::iterator J = Name.begin(); + for (; J != Name.end(); J++) + if (*J == '/' || *J == '"' || *J == ':') + *J = '_'; + Database.Set("CD::" + ID,Name); cout << "This Disc is called '" << Name << "'" << endl;