richardlehane / siegfried

signature-based file format identification
http://www.itforarchivists.com/siegfried
Apache License 2.0
224 stars 30 forks source link

Just use a summary in Status column #65

Closed ross-spencer closed 8 years ago

ross-spencer commented 8 years ago

Status for a file that can't be opened has improved and is presented in the CSV output in -DROID mode (this is incredibly useful!)

Can the output be simplified, so instead of:

open e:\digital_archaeology\path\to\file\...\....txt: The system cannot open the file.

We just see:

The system cannot open the file

Or a similar summary output? - the rest of the information is in the other cells on the row.

richardlehane commented 8 years ago

this is the error as reported by the golang os package.

The concrete error type is a *os.PathError (https://golang.org/src/os/error.go?s=600:634#L16). The error you are interested is the internal error within that object. Could make it a "summary error" by doing err = err.(*os.PathError).Err. POC here: http://play.golang.org/p/d36No_bcEn

I'd need to keep this consistent with reporting of other types of errors, but shouldn't be a drama to do.

ross-spencer commented 8 years ago

That's a clever approach, I'd vote +1.

richardlehane commented 8 years ago

Hi Ross this change now implemented on the develop branch. If you can check that branch out and build to test, much appreciated!

ross-spencer commented 8 years ago

Will do! Shouldn't take too long tomorrow.

On Sun, Jan 17, 2016 at 7:20 PM, Richard Lehane notifications@github.com wrote:

Hi Ross this change now implemented on the develop branch. If you can check that branch out and build to test, much appreciated!

— Reply to this email directly or view it on GitHub https://github.com/richardlehane/siegfried/issues/65#issuecomment-172295184 .

ross-spencer commented 8 years ago

This one is tested and looks good Richard. Thx.

On Sun, Jan 17, 2016 at 9:34 PM, Ross Spencer < all.along.the.watchtower2001@gmail.com> wrote:

Will do! Shouldn't take too long tomorrow.

On Sun, Jan 17, 2016 at 7:20 PM, Richard Lehane notifications@github.com wrote:

Hi Ross this change now implemented on the develop branch. If you can check that branch out and build to test, much appreciated!

— Reply to this email directly or view it on GitHub https://github.com/richardlehane/siegfried/issues/65#issuecomment-172295184 .

richardlehane commented 8 years ago

thx