| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
|/
|
|
|
|
|
|
| |
A typo crept into the encoding of paths used for the hashes of cached
images. The error handler "backslashescape" doesn't exist, it should've
been "backslashreplace."
Fixes #2119
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
Tabs only remembered the pointer of their browsercolumn. This lead to
erroneous rendering of the selection. By additionally keeping track of
the object which is pointed at we can restore the remembered pointer
even when sorting or (un)filtering completely invalidates the remembered
index.
Fixes #1511
Fixes #1995
|
|\ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Python 2 implicitly decodes strings as ASCII or the system's default
encoding before encoding a string to bytes. This results in problems if
the string already contains characters outside the ASCII range (> 127).
I reintroduced this bug thinking encoding a string in both python 2 and
3 would be harmless.
Actually swapped the order of the inode and the path which should've
happened in the previous commit.
Fixes #2054
|
|\ |
|
| |
| |
| |
| |
| | |
`not inode` would fail if the inode happened to be 0. Switched from
appending to prepending the inode to avoid appending to long strings.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without the `st_dev` the `st_ino` is no longer enough to uniquely
identify a file. A disadvantage of including the mtime in the hash is
that changed previews don't overwrite the old cache path so the cached
grows faster.
We use the path to the file to uniquely identify a device. We
concatenate it with the `st_ino` which ensures that replacing a file is
not enough to cause a collision. This is hashed to create the cache
path. Every time we check whether a preview is cached we verify that the
file being preview is as old or older than the cached preview.
The only differences from the original scheme are the algorithm (SHA-512
now), accepting previews of with the same mtime as the original file and
including the inode identifier in the hash.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
Missed a couple py3 version checks
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The `_add_character` method no longer has any `self` references because
of the change in the version check so pylint insists on it being a
function instead.
|
|/ / |
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| |
| | |
`WindowsError` has been merged into `OSError` so we can no longer rely
on it for disambiguation. This means a previously silent error on
Windows regarding the copying of file access times will no longer be
silent.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
One lacking `from __future__ import absolute_import` and one
implicit-format-spec (a custom check!) : )
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have been stuck on pylint <2 for a long time now because it dropped
some of the python 2 lints we rely on. We maintain compatibility with
python 2.6+ and 3.5+ and a lack of lints makes especially the former
much harder. Incompatibilities had already snuck in in the form of
implicit format specs. By implementing a custom checker we can make sure
this doesn't happen again.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Github Actions don't support some of our tests, due to `ncurses`.
This Action fails intentionally so it might get fixed once we figure it
out. If we invert the failure condition to "make CI green" we might
forget about it.
|
| | |
| | |
| | |
| | |
| | | |
Add pytest to the failing workflow because otherwise it's not run with
python 2.7.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Forgot to cast the `programs` generator to a list when dropping the
unnecessary continuation.
Miscellaneous alignment fixes.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
It's unclear why these comprehensions were used, maybe as a way of
cloning the lists? However, this does not seem necessary.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Because of the docstrings the function bodies aren't empty and pass is
not required.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Dict comprehensions were add in 2.7 so we can't use them for COMPAT
reasons.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`no-else-break/continue/raise/return` because they're nonsense and
result in actively less readable code.
`useless-object-inheritance` because that's a py3-ism.
`import-outside-toplevel` because we use this in many places to good
effect.
|
|/ / |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`:mkdir` creates directories recursively like `mkdir -p`.
`:touch` failed when parent directories didn't exist, for convenience
and consistency it now creates missing directories recursively.
Fixes #1998
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Changes the default color for line numbers to differ from the file's
color to the terminal's base foreground color in the default theme.
Green in the jungle theme and bold and/or bright in the snow theme.
Fixes #1906
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We check whether we're running python 2 or 3 in many places. In some
places we do more specific version checks but with the new `PY3`
constant modeled after `six` this code should be slightly more readable.
|
| | | | | |
|
|\ \ \ \ \ |
|