diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:21 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:21 +0000 |
commit | 735a058b1698321093d5ed20ed1ef5f5368038b7 (patch) | |
tree | 02ebf5d24e7aed84abfebe0d135e4619b01316be /cmdline/apt-cdrom.cc | |
parent | b7d9b68ecea1fb31744f42929192e04e56c53d44 (diff) |
More cleanup
Author: jgg
Date: 1998-12-22 08:41:20 GMT
More cleanup
Diffstat (limited to 'cmdline/apt-cdrom.cc')
-rw-r--r-- | cmdline/apt-cdrom.cc | 13 |
1 files changed, 10 insertions, 3 deletions
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; |