Menu

#14 sfind -depth -name combination seems broken

1.0
closed
nobody
None
2020-04-17
2019-10-11
No

Some strange behaviour:

$ ./sfind/OBJ/x86_64-linux-gcc/sfind ./sfind/OBJ -name OBJ           
./sfind/OBJ
$ ./sfind/OBJ/x86_64-linux-gcc/sfind ./sfind/OBJ -depth -name OBJ
$ ./sfind/OBJ/x86_64-linux-gcc/sfind ./sfind/OBJ -depth -name man
$ ./sfind/OBJ/x86_64-linux-gcc/sfind ./sfind/OBJ -depth -name sfind.1
./sfind/OBJ/x86_64-linux-gcc/man/sfind.1
./sfind/OBJ/x86_64-linux-gcc/man
$ ./sfind/OBJ/x86_64-linux-gcc/sfind ./sfind/OBJ -depth -name sfind  
./sfind/OBJ/x86_64-linux-gcc/sfind
./sfind/OBJ/x86_64-linux-gcc
./sfind/OBJ

Discussion

  • Jörg Schilling

    Jörg Schilling - 2019-10-11

    It may be that I missed some dependency quirks...

    The directory is handled later in the function in case that -depth has been in use.
    I thought that this does not cause problems, so I did not test that :-(

     
  • Jörg Schilling

    Jörg Schilling - 2019-10-14

    There was only a minor problem, caused by not restoring the last component index after processing the directory content. Please check the attached patch...

     
  • Tavian Barnes

    Tavian Barnes - 2019-10-16

    Seems to work!

     
  • Jörg Schilling

    Jörg Schilling - 2020-04-17
    • status: open --> closed
     
  • Jörg Schilling

    Jörg Schilling - 2020-04-17

    So closed as it has been fixed last year

     

Log in to post a comment.

MongoDB Logo MongoDB