Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
fix: incorrect usage of Hash.digest #347
Hash.digest expect an encoding value as parameter(latin1 | hex | base64).
The absolute path of the file was passed to
The desired encoding format is then passed to
@@ Coverage Diff @@ ## master #347 +/- ## ======================================= Coverage 69.37% 69.37% ======================================= Files 12 12 Lines 382 382 ======================================= Hits 265 265 Misses 117 117
So yes, this never worked... Thanks so much for the fix!
Effectively we have always been outputting the
The main important thing is that the directory name is random enough that multiple runs of
We could entirely use a random generator here too, which would probably be even less likely to cause the conflict above.
The other concern over fully random directories, was if the process was interrupted before it can clean up, then we leave behind the temporary folder, so there is a risk of file system bloat which was trying to be avoided by at least having a predictable hash generation based on the name.
Hope that explains somewhat the constraints in play here, and why the issue hasn't been critical.