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

Siegfried error on Windows if root of drive is selected as input #67

Open
kieranjol opened this issue Aug 1, 2024 · 4 comments
Open

Comments

@kieranjol
Copy link
Contributor

On Windows 10, i've noticed that if the input is the root of a drive, a Siegfried error appears.

brunnhilde.py  -n D:\ C:\Users\kiera\Desktop\reportttt
2024-08-01 15:26:22,075 - INFO - Brunnhilde started. Source: D:\.
2024-08-01 15:26:22,093 - INFO - Running Siegfried. This might take a while...
2024/08/01 15:26:22 [FATAL] file access error for D:" : CreateFile D:" : The filename, directory name, or volume label syntax is incorrect.
2024-08-01 15:26:22,164 - INFO - Siegfried scan complete. Processing results.
2024-08-01 15:26:22,493 - INFO - Brunnhilde characterization complete. Reports written to C:\Users\kiera\Desktop\reportttt.

Siegfried itself has no issues when running with the input as the drive root. I wonder if it's just an escaping issue?

@kieranjol
Copy link
Contributor Author

Actually it is an escaping issue. I can replicate in sf if I remove the colon:

C:\Users\kiera>sf D
---
siegfried   : 1.11.1
scandate    : 2024-08-01T15:40:51+01:00
signature   : default.sig
created     : 2024-06-21T16:01:11+10:00
identifiers :
  - name    : 'pronom'
    details : 'DROID_SignatureFile_V118.xml; container-signature-20240501.xml'
2024/08/01 15:40:51 [FATAL] file access error for D: CreateFile D: The system cannot find the file specified.

@kieranjol
Copy link
Contributor Author

Here's the command that is produced by Brunnhilde:

sf -csv -hash md5 "D:\" > "C:\Users\kiera\Desktop\8ktop\9\siegfried.csv"

which does indeed produce the error in sf:

C:\Users\kiera>sf "D:\"
---
siegfried   : 1.11.1
scandate    : 2024-08-01T15:58:58+01:00
signature   : default.sig
created     : 2024-06-21T16:01:11+10:00
identifiers :
  - name    : 'pronom'
    details : 'DROID_SignatureFile_V118.xml; container-signature-20240501.xml'
2024/08/01 15:58:58 [FATAL] file access error for D:": CreateFile D:": The filename, directory name, or volume label syntax is incorrect.

@kieranjol
Copy link
Contributor Author

Sorry for the multiple posts, i should have just edited the original. Anyhow I wonder if this could be resolved by using a list for the commands instead of a string with substitutions with shell=True? I think subprocess.check_output() or something similar could replace the piping and work across all operating systems. I could explore this and test unless there's a specific reason for keeping the shell=True approach?

@tw4l
Copy link
Owner

tw4l commented Aug 1, 2024

Sorry for the multiple posts, i should have just edited the original. Anyhow I wonder if this could be resolved by using a list for the commands instead of a string with substitutions with shell=True? I think subprocess.check_output() or something similar could replace the piping and work across all operating systems. I could explore this and test unless there's a specific reason for keeping the shell=True approach?

I suspect you're right that a list with check_output or similar would be better! If you have the bandwidth to try it out, that would be wonderful!

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

2 participants