List Info

Thread: updatedb: --prunepaths doesn't allow directories with whitespace




updatedb: --prunepaths doesn't allow directories with whitespace
user name
2008-03-03 10:49:24
URL:
  <http://savann
ah.gnu.org/bugs/?22467>

                 Summary: updatedb: --prunepaths doesn't
allow directories
with whitespace
                 Project: findutils
            Submitted by: cobbe
            Submitted on: Monday 03/03/2008 at 16:49
                Category: updatedb
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Richard Cobbe
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.20
           Fixed Release: None

    _______________________________________________________

Details:

FindUtils 4.2.20 on Mac OS X, although a brief look at the
source for 4.2.33
suggests that it shares this behavior.

Because the --prunepaths switch takes a space-separated list
of directories
as its argument, there's no way to include a directory whose
name contains
whitespace as part of this argument.  The script interprets
it as two separate
directories.  Trying to escape the spaces with backslashes
or quotes doesn't
work; the escape characters get interpreted as part of the
directory name as
well.




    _______________________________________________________

Reply to this item at:

  <http://savann
ah.gnu.org/bugs/?22467>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





updatedb: --prunepaths doesn't allow directories with whitespace
user name
2008-03-04 04:17:27
Follow-up Comment #1, bug #22467 (project findutils):

See also bug#19374.   The plan is to replace the current
shell script with a
C program.  Leslie Polzer has already written this.   His
code has yet to be
merged but it is available at
http://repo.or.cz/w/findutils.git?a=tree;h=polzer;hb
=polzer.

The C program will probably accept multiple --prunepaths
options, allowing us
(probably) to deprecate the use of the space character
within the option
argument as a separator.    It may be necessary to maintain
backward
compatibility somehow by using a new option with the
imporved semantics,
instead of changing the behaviour of the existing one.

    _______________________________________________________

Reply to this item at:

  <http://savann
ah.gnu.org/bugs/?22467>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





updatedb: --prunepaths doesn't allow directories with whitespace
user name
2008-03-04 09:26:46
Follow-up Comment #2, bug #22467 (project findutils):

Sounds great.  Moving away from the shell to avoid (or at
least reduce)
quoting problems and supporting multiple --prunepath options
are definitely
good moves.  And maintaining backward compatibility by
providing a new option
with the correct semantics makes sense -- just so long as
the correct
semantics are available!

I did a quick scan of the C implementation of updatedb, and
it doesn't look
like it implements the desired semantics yet, so I haven't
tried it out.  But
I'm looking forward to the new version!

    _______________________________________________________

Reply to this item at:

  <http://savann
ah.gnu.org/bugs/?22467>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )