Age | Commit message (Collapse) | Author | Files | Lines |
|
A slightly different approach. In terms of syscalls it probably doesn't
matter at all, but it's a simpler, less hacky and maybe more efficient
way to work around PATH_MAX limitations than constantly chdir()'ing for
each directory. Should also fix the chdir("..") fail case in MacOS
firmlink scenarios, though I haven't a clue if MacOS implements all
these openat()-related calls in the first place.
Downsides:
- Less portable. Everything is in POSIX, but it's more recent than what
we used to use.
- Requires more open file descriptions, might hit the limit for deeply
nested directories.
Haven't done much testing yet, but there's a bunch of TODO's:
- Make refreshing work again (not sure what's going wrong there)
- See if we can report readdir() etc errors again?
- Make firmlink detection work again?
- See how portable this really is.
- Also update file deletion code
|
|
Fixes #171
|
|
Use 'max(10, column_size / 7)' instead of a fixed size of 10
|
|
|
|
What a mess.
https://code.blicky.net/yorhel/ncdu/issues/153#issuecomment-764
|
|
Avoid undeclared identifiers when compiling with older kernel headers.
|
|
|
|
|
|
|
|
|
|
|
|
So we get around the PATH_MAX limitation. Also a tiny bit more
efficient, I hope.
|
|
|
|
|
|
Silly one-character typo that causes directory apparent sizes to be very
off in some scenarios.
Reported & patched by Andrew Neitsch.
|
|
Fixes #150
|
|
|
|
(cherry picked from commit a076ac714aa6fb24e0e9eb227372df84a4b6000b)
|
|
|
|
(cherry picked from commit ef7b4e5c28739c26b3a120296f9dc2ddaf2d4375)
|
|
(cherry picked from commit 9f28920a64c155957b83324cd3a3cf0fda6020c9)
|
|
(cherry picked from commit ad5b7fce74a3b7b0ed726620c81ea552c643cdad)
|
|
(cherry picked from commit 2faefc3b2432409f3ccca0b6ab53a228d5b9b00d)
|
|
(cherry picked from commit 32b77d0064d3e5f52e9204ddeffc29bb21a67753)
|
|
(cherry picked from commit ce7036d249b6f05633c343ab95d88552aab85402)
|
|
(cherry picked from commit 9801f46ece0ca2525f02d71464efc42296dddcb5)
|
|
(cherry picked from commit e4e8ebd9e0037812436a1588809deb23e0f3751a)
|
|
* Use AS_HELP_STRING instead of deprecated AC_HELP_STRING
* Use AC_OUTPUT without arguments
* Enclose AC_INIT argument in brackets
* Add automake option std-options
(cherry picked from commit 53a33e1db2c9a58b867f7db26c5f476c3ee4b00b)
|
|
(cherry picked from commit fd75bd0c22a0ab6935ac5332999ebe77c6d8a1c8)
|
|
|
|
Fixes #141
|
|
|
|
|
|
Reduces memory by a tiny bit. Arguably we never needed tombstones
because entries are never removed, so there shouldn't be any performance
hit there. We don't even need a 'used' flag either, considering that can
be represented by a NULL value, but I'm not really up for
implementing/modifying my own hash table.
ref: https://attractivechaos.wordpress.com/2019/12/28/deletion-from-hash-tables-without-tombstones/
|
|
They were defined (rather than just declared) in .h files, when they
really should be defined in at most a single .c file.
Fixes #140.
|
|
|
|
I assumed that ./configure would fail if it can't find a suitable
compiler for the given --host, but it just falls back to the host gcc.
Fixes #138
|
|
Fixes #135
|
|
|
|
Broken in 77aca35fce59b222254e0dec6ba03249b8d96f78
Fixes #134
|
|
This is a best-effort approach to save ncdu state when memory is low.
There's likely allocation in libraries that isn't being checked
(ncurses, printf).
Fixes #132 (it actually doesn't, that needs a 64bit static binary too,
but I'll get to that)
|
|
Fixes #128.
|
|
This allocation is currently leaked, but as long as we don't allocate
new ones for each refresh, that shouldn't be much of an issue.
(cherry picked from commit 9dc2d32a8fb557112f8f96cd14d50b934543ce39)
|
|
|
|
|
|
stat_to_dir() assumes that buf_dir is clean; calling it twice breaks
that asumption.
|
|
Symlink loops are handled by the stat(2) syscall. Symlinks pointing to a
directory are ignored (to avoid loops in the recursive scan).
|
|
|
|
This adds an 'm' command to show the latest modified time of all files
in a directory. The 'M' command allows for ascending and descending
mtime sorting. These are only enabled with the -e flag and overload
the dir_ext mtime field.
|
|
I had taken care to not sort empty directories during dirlist_open(),
but forgot that manual user actions can still cause dirlist_set_sort()
to be called, which does not handle empty directories.
Reported by Alex Wilson.
|