Fix: Create output directory recursively instead of silently failing to produce output (#413)
* Fix: Create output directory recursively instead of silently failing to write output. Fixes issue #395. * Update changelog, contributors
This commit is contained in:
parent
e847ee0847
commit
a513e2767e
@ -11,6 +11,7 @@
|
||||
user to change filters, manage recursion queue, save snapshot of matches to a file etc.
|
||||
- Changed
|
||||
- Fix a badchar in progress output
|
||||
- Fixed output writing so it doesn't silently fail if it needs to create directories recursively
|
||||
|
||||
- v1.2.1
|
||||
- Changed
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
* [jvesiluoma](https://github.com/jvesiluoma)
|
||||
* [Kiblyn11](https://github.com/Kiblyn11)
|
||||
* [lc](https://github.com/lc)
|
||||
* [mprencipe](https://github.com/mprencipe)
|
||||
* [nnwakelam](https://twitter.com/nnwakelam)
|
||||
* [noraj](https://pwn.by/noraj)
|
||||
* [oh6hay](https://github.com/oh6hay)
|
||||
|
||||
@ -328,7 +328,7 @@ func (s *Stdoutput) writeResultToFile(resp ffuf.Response) string {
|
||||
var fileContent, fileName, filePath string
|
||||
// Create directory if needed
|
||||
if s.config.OutputDirectory != "" {
|
||||
err := os.Mkdir(s.config.OutputDirectory, 0750)
|
||||
err := os.MkdirAll(s.config.OutputDirectory, 0750)
|
||||
if err != nil {
|
||||
if !os.IsExist(err) {
|
||||
s.Error(err.Error())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user