[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: log_accum and spaces in directory names (was Re: loginfo %s q uestio

From: Jerry Nairn
Subject: RE: log_accum and spaces in directory names (was Re: loginfo %s q uestion)
Date: Tue, 20 Nov 2001 17:11:38 -0800

> From: Emile Snyder [mailto:address@hidden
> Sent: Tuesday, November 20, 2001 3:37 PM

> Any glaring
> problems anyone sees?

I don't know if you'd call it a "glaring problem." There are a couple of
problems that can arise because of the way you are attempting to build the
directory name.
a) You will never match a directory name which has multiple consecutive
spaces, like "a   b", or a name which has leading or trailing spaces, like "
a ".
b) You can match the wrong directory if the beginning of a name is the name
of another directory. This would happen if you have "projects" and "projects
a and b".

These may not be likely to happen, but I think they're avoidable with the
method I suggested.
If you're happy with your solution, that's what's important.
If you do decide to do it in some way similar to what I suggested, you can
avoid any problem with commas in directory names by parsing it this way:

undef $special;
if ($filelist =~ s/^(.*)\s\-\s(New director.*|Imported sources)/$2/) {
    $repodir = $1;
    $special = $filelist;
} else {
    $filelist =~
    $repodir = $1;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]