From 735a058b1698321093d5ed20ed1ef5f5368038b7 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:21 +0000 Subject: [PATCH] More cleanup Author: jgg Date: 1998-12-22 08:41:20 GMT More cleanup --- cmdline/apt-cdrom.cc | 13 ++++++++++--- 1 file 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; -- 2.45.2