Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Drop st_dev from sha512_encode | toonn | 2020-07-07 | 1 | -2/+1 |
| | | | | | | The device identifier is not necessarily consistent across reboots or system crashes. Since we don't want to regenerate cached previews at every reboot we can't rely on it. | ||||
* | Switch to packing fields for sha512_encode | toonn | 2020-07-07 | 1 | -5/+7 |
| | | | | | | | | | | | The easy solution was to render the `st_dev, st_ino, st_mtime` to a string and encode that before hashing. This solution is more efficient because it packs the numbers as bytes rather than the digits. Technically POSIX.1 does not specify an upper limit on the sizes for these fields. I think it's safe to say none of the major operating systems will use more than 8 bytes/64 bits any time soon. | ||||
* | Fix indendation of sha512_encode | toonn | 2020-07-07 | 1 | -4/+5 |
| | |||||
* | Hashlib requires objects implementing the buffer API | toonn | 2020-07-07 | 1 | -3/+4 |
| | | | | | | | | | | | The hashes from python's hashlib only support objects that implement the buffer API. Bytes objects (python 2 string, python 3 string.encode()) are such objects. Passing fields from a stat object to a hash directly caused crashes whenever ranger checked for an image preview. Fixes #2032 | ||||
* | Switch from SHA-1 to SHA-512 for the cache | toonn | 2020-06-29 | 1 | -5/+4 |
| | | | | | | | | | | | The performance hit is negligible. File name lengths are usually 255 bytes at minimum (except for FAT, but a SHA-1 digest is truncated too). An attack on the ranger cache based on hash collisions is probably fairly unlikely but preventing it is almost free. This should be merged soon after #1838 because both these PRs change the cache hashes and can therefore cause generation of previews that have been cached before, wasting some disk space. | ||||
* | Get rid of redundant code | toonn | 2020-06-29 | 1 | -6/+1 |
| | | | | | | | | The python version dependence is gone because we no longer want to hash the path. We've been doubling up `os.path.join` calls for a long time, that's silly, let's just not. | ||||
* | Drop file path from cache hash | toonn | 2020-06-29 | 1 | -2/+1 |
| | | | | | | | | | | Because we include the device identifier and the inode in cache hashes now we no longer need the path to the file. Files are already more uniquely identified (if the path was reused for another file with an acceptable mtime there used to be a collision). A small benefit is that hardlinked and symlinked files should now only require a single cached preview. | ||||
* | Include mtime in hash rather than comparing | toonn | 2020-06-29 | 1 | -7/+12 |
| | | | | | | | | | Comparing the mtimes of a file and a cached preview or including the mtime in the preview's hash are almost equivalent except this way we don't need to find out the preview's mtime. We include the device identifier and the inode in the hash, this makes sure duplicate filenames don't cause erroneous hits in the cache. | ||||
* | Allow equal mtime for cached previews | toonn | 2020-02-12 | 1 | -1/+1 |
| | | | | | | This allows the use of symlinks to prevent copying files to the cache. Fixes #1837 | ||||
* | Merge branch 'jrwrigh-patch-1' | toonn | 2020-02-08 | 2 | -3/+5 |
|\ | |||||
| * | Clarify that defaults will not be loaded | toonn | 2020-02-08 | 2 | -3/+5 |
| | | | | | | | | | | Explicitly state that defaults won't be loaded if a configuration file is present and render the docs. | ||||
| * | doc(rifle): Add note of rifle config reading in manpage | James Wright | 2020-02-07 | 1 | -1/+1 |
|/ | | | In response to #1825. | ||||
* | Merge remote-tracking branch 'vifon/tmpcache-cleanup' | toonn | 2020-01-30 | 1 | -0/+13 |
|\ | |||||
| * | Add a newline before printing the exception for better readability | Wojciech Siewierski | 2020-01-27 | 1 | -1/+1 |
| | | |||||
| * | Cleanup the temporary cache directory in the --clean mode | Wojciech Siewierski | 2020-01-27 | 1 | -0/+13 |
|/ | |||||
* | Flip the __release__ flag | toonn | 2019-12-31 | 1 | -1/+1 |
| | |||||
* | Tax loss harvesting release, nothing to see here v1.9.3 | toonn | 2019-12-31 | 7 | -9/+63 |
| | |||||
* | Fix overflows in man page formatting | toonn | 2019-12-31 | 2 | -16/+20 |
| | |||||
* | Merge branch 'dmitmel-examples-bash-automatic-cd' | toonn | 2019-12-31 | 5 | -37/+43 |
|\ | |||||
| * | Added shellcheck directives for specifying shell | Dmytro Meleshko | 2019-11-06 | 2 | -0/+4 |
| | | |||||
| * | Added a notice about sourcing examples/shell_subshell_notice.sh as well | Dmytro Meleshko | 2019-11-06 | 1 | -1/+2 |
| | | |||||
| * | Added mention about sourcing examples/shell_automatic_cd.sh from shell config | Dmytro Meleshko | 2019-11-06 | 1 | -1/+2 |
| | | |||||
| * | Merge branch 'master' into examples-bash-automatic-cd | Dmytro Meleshko | 2019-11-06 | 2 | -23/+37 |
| |\ | |||||
| * | | Updated comments about compatibility with ranger versions | Dmytro Meleshko | 2019-11-06 | 2 | -2/+2 |
| | | | |||||
| * | | Removed shebangs | Dmytro Meleshko | 2019-11-06 | 2 | -4/+0 |
| | | | |||||
| * | | Renamed script files to not mention Bash | Dmytro Meleshko | 2019-11-02 | 2 | -0/+0 |
| | | | |||||
| * | | Added shebangs and removed notices specifically about Bash | Dmytro Meleshko | 2019-11-02 | 2 | -4/+8 |
| | | | |||||
| * | | Apply requested changes to ranger.py and enforce full POSIX compliance | Dmytro Meleshko | 2019-10-28 | 2 | -7/+6 |
| | | | |||||
| * | | Removed replaced $(<...) with cat | Dmytro Meleshko | 2019-10-28 | 1 | -1/+1 |
| | | | |||||
| * | | Added comparison with $PWD back | Dmytro Meleshko | 2019-10-28 | 1 | -1/+1 |
| | | | |||||
| * | | Replaced `[[` with POSIX-compatible `[` | Dmytro Meleshko | 2019-10-28 | 1 | -1/+1 |
| | | | |||||
| * | | Added pattern for mktemp back | Dmytro Meleshko | 2019-10-28 | 1 | -1/+1 |
| | | | |||||
| * | | Refactor the shell script embedded in ranger.py | Dmytro Meleshko | 2019-10-27 | 1 | -9/+10 |
| | | | |||||
| * | | Removed unnecessary arguments for mktemp in examples/bash_automatic_cd.sh | Dmytro Meleshko | 2019-10-27 | 1 | -1/+1 |
| | | | |||||
| * | | Refactored examples/bash_automatic_cd.sh | Dmytro Meleshko | 2019-10-27 | 1 | -7/+7 |
| | | | |||||
* | | | Merge branch 'revolter-patch-1' | toonn | 2019-12-31 | 1 | -1/+1 |
|\ \ \ | |||||
| * | | | Remove duplicate code | Iulian Onofrei | 2019-11-07 | 1 | -1/+1 |
| | |/ | |/| | |||||
* | | | Merge branch 'aRkedos-tmux-fix' | toonn | 2019-12-31 | 4 | -28/+65 |
|\ \ \ | |||||
| * | | | Refactor handle_multiplexer | toonn | 2019-12-31 | 5 | -64/+56 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the method into name changing and resetting methods. `screen -Q` is relatively new so resetting the screen title won't work on systems with an older version, macOS for example. Fixes #1739 | ||||
| * | | | refactoring of redundant code | arkedos | 2019-12-31 | 4 | -23/+70 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | squashing commits for cleaner history. whitespace final fixes refactor of redundant code | ||||
| * | | | applying proposed tmux renaming fix | arkedos | 2019-12-31 | 1 | -6/+4 |
| | | | | |||||
* | | | | Merge branch 'davidgur-master' | toonn | 2019-12-31 | 1 | -0/+1 |
|\ \ \ \ | |/ / / |/| | | | | | | | Fixes #859, #1071, #1308 | ||||
| * | | | Merge branch 'master' into master | David Gurevich | 2019-11-17 | 2 | -1/+9 |
| |\ \ \ | |||||
| * \ \ \ | Merge branch 'master' into master | David Gurevich | 2019-11-16 | 1 | -0/+3 |
| |\ \ \ \ | |||||
| * | | | | | Fixed issue with W3MImgPreview not clearing previous image | David Gurevich | 2019-11-11 | 1 | -0/+1 |
| | | | | | | |||||
* | | | | | | Merge branch 'prosoitos-add_preview' | toonn | 2019-12-30 | 1 | -0/+34 |
|\ \ \ \ \ \ | |||||
| * | | | | | | Move xlsx back to handle_extension | toonn | 2019-12-30 | 1 | -9/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xlsx files aren't properly recognized by `file(1)`. | ||||
| * | | | | | | Move new methods to handle_mime | toonn | 2019-12-30 | 1 | -42/+35 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MIME type handler is preferable because it can match files that have the "wrong" extension or a ".backup" suffix for example. Fixes #1633 | ||||
| * | | | | | | remove pandoc fallback support for json files | Marie-Helene Burle | 2019-12-30 | 1 | -1/+0 |
| | | | | | | | |||||
| * | | | | | | Add '--', empty lines, and pandoc fallback support for html and json | Marie-Helene Burle | 2019-12-30 | 1 | -6/+10 |
| | | | | | | |