Re: [PATCH 3/3] scripts: mkhash fail on hashing a folder

2020-07-17 Thread Paul Spooren
Hi, On 16.07.20 21:20, Bjørn Mork wrote: Paul Spooren writes: To avoid hashing of folders `fopen()` is called in `r+` mode which fails on folders, as their are not writeable. Regular files work as before. This prevents mkhash from working with read-only files. That's unexpected, and IMHO wo

Re: [PATCH 3/3] scripts: mkhash fail on hashing a folder

2020-07-17 Thread Bjørn Mork
Paul Spooren writes: > To avoid hashing of folders `fopen()` is called in `r+` mode which fails > on folders, as their are not writeable. Regular files work as before. This prevents mkhash from working with read-only files. That's unexpected, and IMHO worse than the problem you are trying to fi

[PATCH 3/3] scripts: mkhash fail on hashing a folder

2020-07-16 Thread Paul Spooren
mkhash currently returns the hash of an empty input when trying to hash a folder. This can be missleading in caseswhere e.g. an env variable is undefined which should contain a filename. `mkhash ./path/to/$FILE` would exit with code 0 and return a legit looking checksum. A better behaviour would b