Skip to content

Flag to suppress directory recursing? #20

Description

@martinvonwittich

When ripmime -i is given a directory name, it'll automatically recurse into that directory:

martin.mein-iserv.de ~ # mkdir foo
martin.mein-iserv.de ~ # touch foo/bar
martin.mein-iserv.de ~ # ripmime -i foo
input file is a directory, recursing
Unpacking mailpack foo/bar

This surprised us badly in a buggy shell script that used ripmime like this:

martin.mein-iserv.de ~ # cat test.sh
#!/bin/sh

for i in "$1"/*
do
  ripmime -i "$i" -d "/tmp/foo"
done
martin.mein-iserv.de ~ # ./test.sh                                                      
input file is a directory, recursing                                                    
Unpacking mailpack /bin/ab                                                              
Unpacking mailpack /bin/pidof                                                           
Unpacking mailpack /bin/ipmitool                                                        
Unpacking mailpack /bin/python3.9                                                       
Unpacking mailpack /bin/streamzip.bundled                                               
Unpacking mailpack /bin/uptftopl                                                        
Unpacking mailpack /bin/fincore        
Unpacking mailpack /bin/expect_tknewsbiff                                               
[...]

I feel like an option like --no-recurse to suppress this recursing behavior for situations where ripmime is only ever expected to process files might be useful to guard against such situations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions