about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Drop st_dev from sha512_encodetoonn2020-07-071-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_encodetoonn2020-07-071-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_encodetoonn2020-07-071-4/+5
|
* Hashlib requires objects implementing the buffer APItoonn2020-07-071-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 cachetoonn2020-06-291-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 codetoonn2020-06-291-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 hashtoonn2020-06-291-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 comparingtoonn2020-06-291-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 previewstoonn2020-02-121-1/+1
| | | | | | This allows the use of symlinks to prevent copying files to the cache. Fixes #1837
* Merge branch 'jrwrigh-patch-1'toonn2020-02-082-3/+5
|\
| * Clarify that defaults will not be loadedtoonn2020-02-082-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 manpageJames Wright2020-02-071-1/+1
|/ | | In response to #1825.
* Merge remote-tracking branch 'vifon/tmpcache-cleanup'toonn2020-01-301-0/+13
|\
| * Add a newline before printing the exception for better readabilityWojciech Siewierski2020-01-271-1/+1
| |
| * Cleanup the temporary cache directory in the --clean modeWojciech Siewierski2020-01-271-0/+13
|/
* Flip the __release__ flagtoonn2019-12-311-1/+1
|
* Tax loss harvesting release, nothing to see here v1.9.3toonn2019-12-317-9/+63
|
* Fix overflows in man page formattingtoonn2019-12-312-16/+20
|
* Merge branch 'dmitmel-examples-bash-automatic-cd'toonn2019-12-315-37/+43
|\
| * Added shellcheck directives for specifying shellDmytro Meleshko2019-11-062-0/+4
| |
| * Added a notice about sourcing examples/shell_subshell_notice.sh as wellDmytro Meleshko2019-11-061-1/+2
| |
| * Added mention about sourcing examples/shell_automatic_cd.sh from shell configDmytro Meleshko2019-11-061-1/+2
| |
| * Merge branch 'master' into examples-bash-automatic-cdDmytro Meleshko2019-11-062-23/+37
| |\
| * | Updated comments about compatibility with ranger versionsDmytro Meleshko2019-11-062-2/+2
| | |
| * | Removed shebangsDmytro Meleshko2019-11-062-4/+0
| | |
| * | Renamed script files to not mention BashDmytro Meleshko2019-11-022-0/+0
| | |
| * | Added shebangs and removed notices specifically about BashDmytro Meleshko2019-11-022-4/+8
| | |
| * | Apply requested changes to ranger.py and enforce full POSIX complianceDmytro Meleshko2019-10-282-7/+6
| | |
| * | Removed replaced $(<...) with catDmytro Meleshko2019-10-281-1/+1
| | |
| * | Added comparison with $PWD backDmytro Meleshko2019-10-281-1/+1
| | |
| * | Replaced `[[` with POSIX-compatible `[`Dmytro Meleshko2019-10-281-1/+1
| | |
| * | Added pattern for mktemp backDmytro Meleshko2019-10-281-1/+1
| | |
| * | Refactor the shell script embedded in ranger.pyDmytro Meleshko2019-10-271-9/+10
| | |
| * | Removed unnecessary arguments for mktemp in examples/bash_automatic_cd.shDmytro Meleshko2019-10-271-1/+1
| | |
| * | Refactored examples/bash_automatic_cd.shDmytro Meleshko2019-10-271-7/+7
| | |
* | | Merge branch 'revolter-patch-1'toonn2019-12-311-1/+1
|\ \ \
| * | | Remove duplicate codeIulian Onofrei2019-11-071-1/+1
| | |/ | |/|
* | | Merge branch 'aRkedos-tmux-fix'toonn2019-12-314-28/+65
|\ \ \
| * | | Refactor handle_multiplexertoonn2019-12-315-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 codearkedos2019-12-314-23/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | squashing commits for cleaner history. whitespace final fixes refactor of redundant code
| * | | applying proposed tmux renaming fixarkedos2019-12-311-6/+4
| | | |
* | | | Merge branch 'davidgur-master'toonn2019-12-311-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | Fixes #859, #1071, #1308
| * | | Merge branch 'master' into masterDavid Gurevich2019-11-172-1/+9
| |\ \ \
| * \ \ \ Merge branch 'master' into masterDavid Gurevich2019-11-161-0/+3
| |\ \ \ \
| * | | | | Fixed issue with W3MImgPreview not clearing previous imageDavid Gurevich2019-11-111-0/+1
| | | | | |
* | | | | | Merge branch 'prosoitos-add_preview'toonn2019-12-301-0/+34
|\ \ \ \ \ \
| * | | | | | Move xlsx back to handle_extensiontoonn2019-12-301-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Xlsx files aren't properly recognized by `file(1)`.
| * | | | | | Move new methods to handle_mimetoonn2019-12-301-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 filesMarie-Helene Burle2019-12-301-1/+0
| | | | | | |
| * | | | | | Add '--', empty lines, and pandoc fallback support for html and jsonMarie-Helene Burle2019-12-301-6/+10
| | | | | | |