Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag to suppress directory recursing? #20

Open
martinvonwittich opened this issue Feb 23, 2023 · 0 comments
Open

Flag to suppress directory recursing? #20

martinvonwittich opened this issue Feb 23, 2023 · 0 comments

Comments

@martinvonwittich
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant