diff -Nru qdirstat-1.5.91/debian/changelog qdirstat-1.6/debian/changelog --- qdirstat-1.5.91/debian/changelog 2019-07-17 09:45:41.000000000 +0000 +++ qdirstat-1.6/debian/changelog 2019-07-23 09:36:27.000000000 +0000 @@ -1,3 +1,9 @@ +qdirstat (1.6-1) unstable; urgency=medium + + * New upstream release. + + -- Patrick Matthäi Tue, 23 Jul 2019 11:36:27 +0200 + qdirstat (1.5.91-1) unstable; urgency=medium * New upstream release. diff -Nru qdirstat-1.5.91/doc/DevHistory.md qdirstat-1.6/doc/DevHistory.md --- qdirstat-1.5.91/doc/DevHistory.md 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/doc/DevHistory.md 2019-07-22 12:46:55.000000000 +0000 @@ -10,6 +10,450 @@ ## QDirStat History + + +- 2018-11-07 **New stable release: V1.5** + + Summary: + + - (Optional) breadcrumbs navigation + + - (Optional) a new "details" panel for the currently selected item + + - (Optional) new tree columns: + owner, group, permissions both in "rwxrwxrwx" and in octal format + + - Package manager support for the major Linux package managers (dpkg / rpm / + pacman) to see what package a system file belongs to. + + - Quick-switchable different layouts for the main window + + - A new "General" page in the configuration dialog + + - Show in the window title if the program runs with root permissions (`sudo` + etc.) + + - (Optional) show the URL in the window title + + - Some bug fixes + + For more details, see the [full release announcement](https://github.com/shundhammer/qdirstat/releases/tag/1.5). + + +- 2018-11-03 + + Added showing release notes (in an external web browser) to the "Help" menu + ("What's New in this Release"). + + +- 2018-10-26 + + The pre-1.5 Beta is out: [QDirStat-1.4.97-Beta](https://github.com/shundhammer/qdirstat/releases/tag/1.4.97-Beta) + + +- 2018-10-21 + + - Updated all screenshots to the latest Git source version in preparation for the + upcoming pre-1.5 Beta. + + - Added a little left margin to the "Latest MTime" column in the tree to make + it look less overcrowded. + + +- 2018-10-20 + + - Reintroduced showing the elapsed time during directory reading. + + You might have noticed that QDirStat's performance has decreased with all + the kernel patches to work around the Meltdown and Spectre security + problems caused by CPU design; system calls have become a lot more + expensive in terms of performance now. And QDirStat does a LOT of system + calls while reading directories: `opendir()` / `readdir()` for each + directory in the tree and `lstat()` for every single file or directory + found in the tree: My 6.8 GB root filesystem has 275,000 items total and + 25,500 directories which means well over 300,000 system calls. Every single + one of them now causes kernel page tables to be cleared and restored for + every switch between user space and kernel space, and that means quite some + performance impact. + + This all means that it's now worthwhile again to display the elapsed time + during directory reading. It used to be over in a heartbeat, so it wasn't + worthwhile to display that; but that's different now. + + - Added a _General_ page to the configuration dialog for miscellaneous + settings. + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-config-general.png) + + This is a bit unorganized (as might be expected for misc settings), but + those misc settings had accumulated over time, so I decided to finally add + such a page. + + The settings were always accessible, but only by editing the config file + (`~/.config/QDirStat/QDirStat.conf`) manually. For some settings you might + still have to do that: Some are too exotic for general use, some others + would confuse the average user much more than they would help. + + +- 2018-10-19 + + - Added different layouts to the main window: + + You can now switch between three (at the moment) different layout options + for the upper half of QDirStat's main window. + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L1.png) + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L3.png) + + - Layout 1 (short): Display only a bare minimum of columns in the tree + view, but show the new details panel on the right side. This is to + minimize clutter in the tree view, yet keep all the information + available. + + - Layout 2 (classic): Display the same columns as always in the tree view + and additionally the new details panel on the right side. + + - Layout 3 (full): Display all available columns in the tree view, + including the new file owner, group, permissions in both "rwxrwxrwx" and + octal. But don't display the new display side panel so there is enough + screen space to show all those columns. + + Switching between the layouts is as easy as pressing one of the three new + buttons in the tool bar: L1, L2, L3. Or use the corresponding entries in + the "View" menu. Or use the Alt-1, Alt-2, Alt-3 key combinations. + + For each view, you can individually configure what columns to display and + whether or not to display the new details side panel and / or the new + breadcrumbs navigator. + + The column widths are still configured globally (and this will remain like + that); I experimented with that and found it _very_ awkward to have to set + all of them individually for each layout. + + - We are approaching a new release (I guess you figured that with all the + recent changes). Most likely there will be at least one Beta release (if + there are problems maybe more) before the 1.5-stable release. + + - There is still some (limited) time to add even more package managers if + anybody feels inclined to submit patches. But please be advised that I + can't do much maintenance for any of those since I don't have any system + with them readily available to test anything; the ones that I have use + _dpkg_ or _rpm_. + + - Fixed [GitHub Issue #86](https://github.com/shundhammer/qdirstat/issues/86): + CacheWriter errors go unnoticed much too easily. + + This was a direct result of me giving in to nagging people wanting features + of very limited value: The status bar flickering like crazy all the time + because somebody back some time ago had wanted the current treemap tile's + path and size in the status bar as the mouse hovers over it. + [GitHub Issue #30](https://github.com/shundhammer/qdirstat/issues/30) + + The effect is that nobody pays attention anymore at all to that status bar + because it's flickering all the time anyway, so it has become useless as a + tool to report anything of importance; and status bar messages are gone + immediately, too, when the user happens to move the mouse across the + treemap. + + As a consequence, I just disabled that by default; if anybody really wants + it, edit the QDirStat config file (`~/.config/QDirStat/QDirStat.conf`) and + enable it again: + + UseTreemapHover=true + + _Update 2018-10-20: This can now be changed in the new "General" page of + the configuration dialog; no need to edit the config file manually._ + + +- 2018-10-18 + + - Added support for the _pacman_ package manager for Manjaro and Arch Linux. + + This should now cover the most common package managers for Linux to find + out what package a system file belongs to: _dpkg_, _rpm_, _pacman_. + + As mentioned before, higher-level package managers such as _apt_, _zypper_, + _yum_ or front-ends like _synaptic_, _PackageKit_ all use one of the + lower-level package managers internally, so it doesn't matter if you never + used one of the lower-level tools before. + + - Tried to add support for the _pkg_ package manager ("pkg info") for FreeBSD + / OpenBSD, but unfortunately it only knows what package owns files of + _ports_ / _3rd party_, not for the base system. + + The helpful people in the _#freebsd_ IRC channel on _freenode_ confirmed + that. So this will have to wait until there is useful support for it from + the system side on those platforms. _BSD people, let me know!_ + + +- 2018-10-16 + + - QDirStat now shows `[root]` in the window title if it is running with root + privileges. + + - If invoked with `sudo`, now restoring the owner of the config files to the + real user (if possible) if those file are in the user's home directory. + Previously on some systems they were owned by _root_ which meant they were + no longer writable by the real user, silently discarding all subsequent + changes to the configuration (including window sizes etc). + + This might be different depending on how `sudo` is configured on a system; + on SUSE, it uses the root user's home directory, on Ubuntu, the home + directory of the user who invoked `sudo`. + + +- 2018-10-07 + + Added better classification of files to the new file details view: + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) + + - MIME Category - this is the same as in the treemap colors, the same as you + can configure in the _MIME Categories_ page in the QDirStat configuration + dialog. By default, it shows very broad categories ("Documents, "Music", + "Images", "Videos", "Source Files", ...), but you can configure them to + much finer detail if you wish. + + - System file or not. This is important if you want to run any cleanup + actions in that directory; you probably don't want to mess with system + files, even if running QDirStat as root. + + A system file in this context is a file that is either owned by a system + user (a UID < 500) or that is located in a known system directory (/usr, + /lib, ..., but not /usr/local). + + - For system files, the package that this file belongs to. This gives a + surprising amount of insight (it was surprising to me, at least) where all + the disk space on the system directories goes to, most importantly some of + the big blobs in the tremap. + + As of now, this is supported for Linux systems using a package manager + based on _dpkg_ or on _rpm_: + + - Debian + + - Ubuntu / Kubuntu / Xubuntu / Lubuntu + + - SUSE (openSUSE Tumbleweed or Leap, SLES) + + - Red Hat (Fedora, RHEL) + + ... and dozens more (basically all that are based on any of the above). + + This works by running `dpkg -S` or `rpm -qf` as external commands, so this + is a somewhat expensive operation. To keep the user interface responsive, + QDirStat now has an "adaptive timer" for updating that information: + Normally, the result is shown instantly, but if you click around wildly, + there is a timer that is increased or decreased (thus "adaptive") for a + delayed update after that timeout (0 / 333 / 1000 / 2500 millisec right + now). + + It can even handle _rpm_ installed as a foreign package manager on a _dpkg_ + based system (and the other way round); it tries the primary package + manager first, then any others that are also installed. + + Please notice that _apt_, _synaptic_, _zypper_, _pkgkit_ and whatnot are + all higher level package managers that ultimately use one of the low level + ones, so even if you only use a higher level package manager, it still + works without restriction. + + If your system does not use _dpkg_ or _rpm_, those who can are invited to + contribute patches for other package managers; it's really simple: + + https://github.com/shundhammer/qdirstat/blob/master/src/PkgManager.cpp#L140 + + The API is not final yet; there may be more regexp support in the near + future (so it will only get simpler). But you get the idea. + +-------------------------------------------------- + +- 2018-10-03 + + - Added a new details view next to the tree view. + Of course this can be disabled (Menu _View_ -> uncheck _Show Details Panel_). + + This view shows context-sensitive information about the currently selected + item(s); see also the screenshots (still not complete, but you get the idea): + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-dir.png) + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-dot-entry.png) + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-multi-sel.png) + + What that details view displays so far: + + - File: name, type (file / symlink / block device / character device / + FIFO), size, user, group, permissions both as rwxrwxrwx and octal, + modification time. + + - Directory: name with appended slash to easier recognize what it is, type + (directory), subtree total size, total items, total files, total + subdirs, latest modification time in the entire subtree; directory own + size, user, group, permissions both as rwxrwxrwx and octal, modification + time of the directory node itself (that was never shown before). + + - pseudo directory: Only the subtree information like for a + directory, but no user / group / permissions since there is no + counterpart for it on the filesystem. + + - Multi-selection: Number of selected items, total size, number of files, + number of directories, number of files in any subtrees of those + directories. This should show a bit more clearly what is affected if you + choose to delete all that selected stuff. + + The view can scroll, so extremely long file names (as are common e.g. below + `.git/objects` directories don't blow this view up to take all the screen + space away from the tree and the treemap. + + + - Unified the different size columns into one: No more "Subtree Size" and + "Own Size" separately, but now just "Size". The reasoning used to be that + there was no way to tell how large the directory node itself was. But that + information is now readily available in the details view if anybody is + really interested. + + Plans for the immediate future: + + - Add some package manager support, at least for the very common ones on + Linux (_deb_ and _rpm_ so far): Find out what package a system file belongs + to and show it (on demand or after a short delay) in the details view. This + can be done even as non-root with some commands like `dpkg -S` or `rpm + -qf`. There will probably be support for adding your own command lines in + the config file if you use another package manager. + + - Some simple checks if a file is probably a system file; for example, files + below `/usr/bin` (and other very common system directories) and/or files + that are owned by a user with a UID < 500 (or so) are very likely system + files that should be very careful to delete. The details view should show + you that; maybe there should also be a warning in the cleanup actions if + any such files are affected by a potentially destructive cleanup action. + + - Easily switchable different layouts for the tree columns and the details + view: + + - Minimalistic: Only the bare essentials of columns plus the details view. + + This should remove a lot of the current clutter on the screen, and it + should display the same information, only rearranged a bit. How often do + you really need fields like number of items / files / subdirs in the tree + view? They would be most useful there if you wish to sort the tree after + any of them. How often do you do that? And with the new details view, the + information is still available, but does not clutter the table. + + - Default: Pretty much what you can see now in the new screenshots + + - Maximum information: All columns, including the new user / group / + permissions columns, but (to make space) no details view + + If it makes sense (not sure yet), maybe also user defined views (say, 3 of + them?) that you can define to your personal liking. I kinda like how camera + makers use that (U1 / U2 on Nikon cameras, C1 / C2 / C3 on Canon and + Panasonic). I am not completely sure yet just how useful that is; I'll need + to experiment. + + +- 2018-10-02 Implemented a _breadcrumbs_ widget to show the current path and + for easier navigation up the directory hierarchy. See also the new + screenshots. + + Of course this can be disabled (Menu _View_ -> uncheck _Show Current Path_). + + +- 2018-09-27 Fixed [GitHub issue #84](https://github.com/shundhammer/qdirstat/issues/84): + Crash if picking up a cache file in the starting directory (subtree root). + + This was a crash that happened when users had used the supplied + _qdirstat-cache-writer_ script to generate cache files in certain directories + for faster directory scanning (at the price of having slightly outdated + data), and QDirStat was not started with that cache file as a command line + argument, but it would find it while reading the directory at the starting + directory (and only there). This was probably broken for a long time, yet + nobody had noticed (or nobody bothered to write a bug report). This might be + an indication that this cache file feature is not widely used, so only a + small number of users seem to be affected. Anyway, this is now fixed. + + +- 2018-09-23 Implemented [GitHub issue #80](https://github.com/shundhammer/qdirstat/issues/80): + Show directory/file user (owner), group and permissions in the tree view. + + Those new columns are not visible by default. Use the context menu in the + tree columns header to enable them. They might be useful for some users; for + others, they may be just more clutter being displayed. + + Sorting by those colums is somewhat basic; both user and group are sorted by + the numeric uid or guid; the permissions are sorted by the numeric value of + the mode field. Looking up user or group names is a somewhat costly + operation. It might also make sense to order system files first (user with + UID 0, i.e. root; other system users also have small UIDs.) + + See issue #80 for a screenshot. + + +- 2018-08-26 Noah Davis (noahdvs) contributed a new application icon for QDirStat: + + + + I had made the old icon myself back in early 2000 for the first KDirStat 0.86 + release. I never liked it very much, but the new application just needed an + icon. Finally somebody with more artistic talent than myself made one that + looks a lot more professional. Thank you, Noah! + + +- 2018-04-26 Implemented [GitHub issue #77](https://github.com/shundhammer/qdirstat/issues/77): + Show the current URL in the window title. This is disabled by default. + You can enable it manually in the config file (`~/.config/QDirStat/QDirStat.conf`): + + [MainWindow] + ... + UrlInWindowTitle=true + + Some day this will be configurable in a new tab in the configuration dialog, + but right now there are only so few options that would go to such a "General" + or "Misc" tab that it would look pretty lost and unorganized. + + +- 2018-02-08 Fixed [GitHub issue #74](https://github.com/shundhammer/qdirstat/issues/74): +Crash deleting folder while scan is in progress + + This fix comes on two levels: + + - A fix on the GUI-level that simply makes sure that the "move to trash" + action in the tool bar / context menu is disabled while a directory tree is + read. + + - A fix on the low-level internal classes for the in-memory directory tree + and the read job queue: This now also makes sure that whenever a subtree is + deleted from the outside (e.g. because of cleanup actions), any pending + directory read jobs for that subtree are removed from the job queue. + +- 2018-02-03 Fixed [GitHub issue #72](https://github.com/shundhammer/qdirstat/issues/72): +Allow to specify install prefix + + You can now install to another location like `/usr/local` if desired. + The default remains `/usr`. See section _Install to a Custom Directory_. + + +- 2018-01-12 Some small fixes: + + - Fixed duplicate keyboard shortcut for actions "Stop Reading" (now: Ctrl-S) + and "Copy URL to Clipboard" (still Ctrl-C). + + - Fixed exclude rules not matching correctly against direct root directory + children: A rule that should match "/var" now works correctly. You'd need + to specify "//var" in the rule which of course was wrong. + + - Now only adding the default exclude rule ".snapshot" once. If you remove + that one, it should no longer keep reappearing if there are no other + exclude rules. + + - Fixed some minor issues in the exclude rule configuration dialog with some + widgets not being correctly disabled if they made no sense to use. + + +---------------------------- + + - 2017-06-04 **New stable release: V1.4** It's about time to ship all those latest changes. diff -Nru qdirstat-1.5.91/man/qdirstat.1 qdirstat-1.6/man/qdirstat.1 --- qdirstat-1.5.91/man/qdirstat.1 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/man/qdirstat.1 2019-07-22 12:46:55.000000000 +0000 @@ -1,19 +1,253 @@ -.TH "QDIRSTAT" "1" "July 2017" +.TH "QDirStat" "1" "July 2019" .SH NAME -qdirstat \- Qt\-based directory statistics +QDirStat \- Qt\-based directory statistics + .SH DESCRIPTION QDirStat is a graphical application to show where your disk space has gone and to help you to clean it up. + +.SH USAGE +.B qdirstat +[OPTION]... +[\fI\fR] + +.B qdirstat +\-\-cache|\-c \fI\fR + +.B qdirstat +pkg:/\fI\fR + +.B qdirstat +unpkg:/\fI\fR + +.SH OPTIONS + .PP -Usage: +.B \-h|\-\-help .IP -qdirstat [\-\-slow\-update|\-s] [] -qdirstat \fB\-\-cache\fR|\-c -qdirstat \fB\-\-help\fR|\-h -.PP -.SH "AUTHOR" -This manual page was written by Patrick Matth\[:a]i -for qdirstat. +Show a summary of command line options on stdout. +.B That information might be more up-to-date than this man page. + + +.PP +.B \-s|\-\-slow\-update +.IP +Slow down display updates during directory reading. This is useful when running +QDirStat over a remote X11 connection. + +The exact update interval is specified in the \fBSlowUpdateMillisec\fR +parameter in the \fB[DirectoryTree]\fR section of the configuration file. The +default is 3000 milliseconds (3 seconds). + + +.PP +.B \-d|\-\-dont-ask +.IP +Don't prompt for a directory to read upon program start even if no directory +was specified on the command line. + + +.PP +.B \-c|\-\-cache \fI\fR +.IP +Read the content of a directory tree from a \fIcache file\fR that was generated +by QDirStat's "Write to Cache File" option or by the \fBqdirstat-cache-write\fR +script. + +A file \fB.qdirstat.cache.gz\fR in the directory that it describes is +automatically picked up and used: A cache file +/data/archive/foo/.qdirstat.cache.gz with the content of /data/archive/foo is +used automatically when found while reading a directory tree containing it. + +.SH NORMAL OPERATION + +.PP +You start the program without any parameters; then it will open a directory +selection box to let you choose an existing directory. Alternatively, you can +specify the path of an existing directory as a command line parameter. + +The program will then start reading that directory tree, i.e. it will +recursively traverse that directory tree and read information for each +directory and its subdirectories. + +The result is displayed in a tree view where you can open and close +branches. The tree view displays information such as the accumulated size of +each subtree, the number of items, the number of files, the latest modification +time ("mtime") in that subtree, and some more. You can sort the tree by each of +those columns. + +You can select one or more items in the tree view to get more detailed +information or to start "cleanup actions": Move to trash, remove immediately +(caution!), create a gzipped tarball from a directory, "make clean", open a +file manager window with that directory or start a shell there - and more. Use +the context menu (right mouse button) or the "Clean Up" menu in the menu bar +(you can "tear off" that menu so it remains open). + +There are three predefined column layouts L1, L2, L3 where you can switch what +columns are displayed and whether or not to display the details panel at the +right. + +Right-click on a column header to show or hide individual columns or to switch +between automatic column width and a user-defined width (drag the column +divider in the header). You can rearrange the order of columns with drag and +drop (but the "Name" column will always remain fixed at the very left side). + + +.SH THE TREEMAP + +As a secondary view, there is a "treemap" with colored rectangles +("tiles"). The area of each of those tiles corresponds to its size; the larger +a tile, the larger the item. So you can spot a large file buried deep down in a +directory hierarchy easily. + +The color of each tile corresponds to its type ("MIME category"). There are +number of predefined categories such as images (photos etc.), videos, music +etc.; they can be configured in the configuration dialog (menu "Settings" -> +"Configure QDirStat"). + + +.SH PKG URLS / PACKAGES VIEW + +.PP +Specifying a \fBpkg:/\fR URL at the command line starts the packages view. + +The package specification is case insensitive. + +Some heuristics are used to determine what mode to use: The default is "starts +with", but if the search pattern contains typical regexp special characters, it +interprets the pattern as a regular expression. + +If it detects just "*" (not ".*") or "?", it uses wildcard mode. + +If the first character is "=", it uses exact matching. + +.PP +\fBqdirstat pkg:/chrom\fR +.IP +This shows all packages starting with "chrom" or "Chrom" or "CHROM". + +.PP +\fBqdirstat pkg:/=emacs\fR +.IP +This shows only package "emacs", not "emacs25" or any other one starting with +"emacs". + +.PP +\fBqdirstat "pkg:/*gtk*"\fR +.IP +This shows all packages that have "gtk" somewhere in their name. + +Notice that you have to protect the "*" wildcards from the shell by escaping +them with quotes. + +.PP +\fBqdirstat "pkg:/.*qt[45].*"\fR +.IP +This shows all Qt4 or Qt5 packages. + +.PP +\fBqdirstat "pkg:/(firefox|mozilla|chrome|chromium|opera)"\fR +.IP +This shows all the well-known browsers on the system. Notice that regular +expressions use a partial match, so use the "^" and "$" anchors when appropriate. + + +.SH UNPKG URLS / UNPACKAGED FILES VIEW + +.PP +Specifying an \fBunpkg:/\fR URL at the command line starts the "unpackaged +files" view: This reads the specified directory and ignores files that are +owned by an installed software package. +.PP +Some well-known directories that are known to contain only unpackaged files are +excluded by default, and some file types are ignored by default: + +.IP +.TS +tab(@); +l l . +/home@user home directories +/root@home directory of the root user +/tmp@directory for temporary files +/var@variable data for all kinds of software +/usr/lib/sysimage/rpm@RPM database +/usr/local@locally installed software + +*.pyc@compiled Python files +.TE + +.PP +This list can be modified when starting the unpackaged files view from the +menu. Starting the view from the command line uses the same settings that were +used last time when using the menu. + +.PP +\fBqdirstat unpkg:/\fR +.IP +This shows the unpackaged files of the complete root filesystem. + +.PP +\fBqdirstat unpkg:/usr/share\fR +.IP +This shows the unpackaged files of /usr/share. + + +.SH FILES + +.TS +tab(@); +l l . +~/.config/QDirStat/QDirStat-cleanup.conf@cleanup actions configuration +~/.config/QDirStat/QDirStat-exclude.conf@exclude rules configuration +~/.config/QDirStat/QDirStat-mime.conf@MIME categories configuration +~/.config/QDirStat/QDirStat.conf@general configuration + +/tmp/qdirstat-$USER/qdirstat.log@current / last log file +/tmp/qdirstat-$USER/qdirstat-*.old@previous log files + +**/.qdirstat.cache.gz@auto-used cache file +.TE + + +It is safe to delete any or all of the configuration files; the next program +start will restore them with default settings. + +The configuration files can safely be edited while QDirStat is not +running. Many parameters can be accessed via GUI, but some (the more arcane +ones) can only be changed by editing a configuration file manually. + +.SH PROJECT HOME PAGE + +.UR +https://github.com/shundhammer/qdirstat + +.SH SEE ALSO + +.UR +https://github.com/shundhammer/qdirstat/tree/master/doc + +and don't forget the "Help" menu! + + +.SH BUGS +See the issue tracker at the project repository: + +.UR +https://github.com/shundhammer/qdirstat/issues + + +.PP +.SH AUTHORS + +QDirStat was written by Stefan Hundhammer based on +the original KDE 3 KDirStat (also by Stefan Hundhammer). While a number of +people contributed small patches and fixes, the project is largely a +one-man-show. + +This manual page was written by Stefan Hundhammer +based on the initial one written for QDirStat by Patrick Matth\[:a]i +. + Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. diff -Nru qdirstat-1.5.91/README.md qdirstat-1.6/README.md --- qdirstat-1.5.91/README.md 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/README.md 2019-07-22 12:46:55.000000000 +0000 @@ -10,7 +10,7 @@ License: GPL V2 -Updated: 2019-07-09 +Updated: 2019-07-22 ## Overview @@ -113,7 +113,7 @@ ## Latest Stable Release -**QDirStat V1.5** +**QDirStat V1.6** See the [release announcement](https://github.com/shundhammer/qdirstat/releases). @@ -123,6 +123,105 @@ ## Latest News +- 2019-07-22 **New stable release: V1.6** + + - Performance improvement while reading directories: On average 25% faster on + normal (non-SSD) disks + + See also this article: [Linux Disk Usage Tools Compared: QDirStat + vs. K4DirStat vs. Baobab vs. Filelight vs. ncdu including + benchmarks](https://github.com/shundhammer/qdirstat/issues/97) + + + - Vast performance improvement for huge directories (with 100.000 entries or + more in a single directory) in the tree view: There is now instant response + for jumping from the first to the last item, dragging the scroll bar or + using the mouse wheel. + + - New **packages view**: + QDirStat can now visualize the file lists of installed packages: + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-pkg-details.png) + + I.e. files are now grouped by the package they belong to, and in each + subtree only the files that belong to the package are displayed: In this + example, in `/usr/bin` only the `chromium-browser` binary is displayed, not + all the other files in `/usr/bin`. This is intentional. + + You can display all installed packages with their file lists (but that + takes a while), or you can select just a subset. Use Menu _File_ -> _Show + Installed Packages_ or start QDirStat with a `pkg:/` command line argument. + + As with the other package manager related features, this is supported for + all Linux distributions that use one of _dpkg_, _rpm_ or _pacman_ (or any + higher-level package manager based on any of those like _apt_, _zypper_ + etc.). + + More details at [Pkg-View.md](doc/Pkg-View.md). + + + - New **unpackaged files view**: + + QDirStat can now visualize the files in system directories that are not + packaged, i.e. that are not part of any file list of any installed software + package. + + [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-unpkg-usr-share-qt5.png) + + This can be useful to track down problems after package upgrades or after + manually installing software with `sudo make install`. + + This is supported for all Linux distributions that use _dpkg_ or _rpm_ (or + any higher-level package manager based on any of those like _apt_, _zypper_ + etc.). + + More details at [Unpkg-View.md](doc/Unpkg-View.md). + + + - New standard cleanup: _Check File Type_. This uses the `file` command to + find out more detailed information what exactly a file is and displays it + in the cleanup output window. + + More details, screenshots and how to get it if you already have an existing + QDirStat cleanup configuration file (i.e. if you used QDirStat before): + [GitHub Issue #102](https://github.com/shundhammer/qdirstat/issues/102). + + - Implemented [GitHub Issue #90](https://github.com/shundhammer/qdirstat/issues/90): + Support excluding directories containing a file with a specific name or pattern. + + Similar to some backup tools, you can now specify an exclude rule that lets + you exclude a directory that contains a file like `.nobackup` or + `.qdirstatexclude`. + + - Greatly improved the man page; see `man 1 qdirstat`. + + - Some bug fixes. + + See also the [release announcement](https://github.com/shundhammer/qdirstat/releases/tag/1.6). + +-------------------------------------------------- + + +- 2019-07-18 + + - Greatly improved the man page; see `man 1 qdirstat`. + + It started with the Debian maintainer of QDirStat asking for a man page + because that's a standard requirement for Debian packages, and he even + wrote the initial one; thanks again, Patrick!. + + That initial man page was very concise, and as QDirStat keeps evolving, not + only was there an increasing number of command line options that was not + documented in the man page (but of course when invoking the program with + the `--help` command line option), but it also didn't explain much beyond + the command line arguments. + + Now it contains not only the latest set of command line arguments including + syntax and meaning of `pkg:/` and `unpkg:/` URLs, but also some general + information what the program is (including what the treemap is) and how to + use it. + + - 2019-07-08 New **unpackaged files view**: @@ -428,444 +527,6 @@ - 2018-11-07 **New stable release: V1.5** - Summary: - - - (Optional) breadcrumbs navigation - - - (Optional) a new "details" panel for the currently selected item - - - (Optional) new tree columns: - owner, group, permissions both in "rwxrwxrwx" and in octal format - - - Package manager support for the major Linux package managers (dpkg / rpm / - pacman) to see what package a system file belongs to. - - - Quick-switchable different layouts for the main window - - - A new "General" page in the configuration dialog - - - Show in the window title if the program runs with root permissions (`sudo` - etc.) - - - (Optional) show the URL in the window title - - - Some bug fixes - - For more details, see the [full release announcement](https://github.com/shundhammer/qdirstat/releases/tag/1.5). - - -- 2018-11-03 - - Added showing release notes (in an external web browser) to the "Help" menu - ("What's New in this Release"). - - -- 2018-10-26 - - The pre-1.5 Beta is out: [QDirStat-1.4.97-Beta](https://github.com/shundhammer/qdirstat/releases/tag/1.4.97-Beta) - - -- 2018-10-21 - - - Updated all screenshots to the latest Git source version in preparation for the - upcoming pre-1.5 Beta. - - - Added a little left margin to the "Latest MTime" column in the tree to make - it look less overcrowded. - - -- 2018-10-20 - - - Reintroduced showing the elapsed time during directory reading. - - You might have noticed that QDirStat's performance has decreased with all - the kernel patches to work around the Meltdown and Spectre security - problems caused by CPU design; system calls have become a lot more - expensive in terms of performance now. And QDirStat does a LOT of system - calls while reading directories: `opendir()` / `readdir()` for each - directory in the tree and `lstat()` for every single file or directory - found in the tree: My 6.8 GB root filesystem has 275,000 items total and - 25,500 directories which means well over 300,000 system calls. Every single - one of them now causes kernel page tables to be cleared and restored for - every switch between user space and kernel space, and that means quite some - performance impact. - - This all means that it's now worthwhile again to display the elapsed time - during directory reading. It used to be over in a heartbeat, so it wasn't - worthwhile to display that; but that's different now. - - - Added a _General_ page to the configuration dialog for miscellaneous - settings. - - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-config-general.png) - - This is a bit unorganized (as might be expected for misc settings), but - those misc settings had accumulated over time, so I decided to finally add - such a page. - - The settings were always accessible, but only by editing the config file - (`~/.config/QDirStat/QDirStat.conf`) manually. For some settings you might - still have to do that: Some are too exotic for general use, some others - would confuse the average user much more than they would help. - - -- 2018-10-19 - - - Added different layouts to the main window: - - You can now switch between three (at the moment) different layout options - for the upper half of QDirStat's main window. - - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L1.png) - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L3.png) - - - Layout 1 (short): Display only a bare minimum of columns in the tree - view, but show the new details panel on the right side. This is to - minimize clutter in the tree view, yet keep all the information - available. - - - Layout 2 (classic): Display the same columns as always in the tree view - and additionally the new details panel on the right side. - - - Layout 3 (full): Display all available columns in the tree view, - including the new file owner, group, permissions in both "rwxrwxrwx" and - octal. But don't display the new display side panel so there is enough - screen space to show all those columns. - - Switching between the layouts is as easy as pressing one of the three new - buttons in the tool bar: L1, L2, L3. Or use the corresponding entries in - the "View" menu. Or use the Alt-1, Alt-2, Alt-3 key combinations. - - For each view, you can individually configure what columns to display and - whether or not to display the new details side panel and / or the new - breadcrumbs navigator. - - The column widths are still configured globally (and this will remain like - that); I experimented with that and found it _very_ awkward to have to set - all of them individually for each layout. - - - We are approaching a new release (I guess you figured that with all the - recent changes). Most likely there will be at least one Beta release (if - there are problems maybe more) before the 1.5-stable release. - - - There is still some (limited) time to add even more package managers if - anybody feels inclined to submit patches. But please be advised that I - can't do much maintenance for any of those since I don't have any system - with them readily available to test anything; the ones that I have use - _dpkg_ or _rpm_. - - - Fixed [GitHub Issue #86](https://github.com/shundhammer/qdirstat/issues/86): - CacheWriter errors go unnoticed much too easily. - - This was a direct result of me giving in to nagging people wanting features - of very limited value: The status bar flickering like crazy all the time - because somebody back some time ago had wanted the current treemap tile's - path and size in the status bar as the mouse hovers over it. - [GitHub Issue #30](https://github.com/shundhammer/qdirstat/issues/30) - - The effect is that nobody pays attention anymore at all to that status bar - because it's flickering all the time anyway, so it has become useless as a - tool to report anything of importance; and status bar messages are gone - immediately, too, when the user happens to move the mouse across the - treemap. - - As a consequence, I just disabled that by default; if anybody really wants - it, edit the QDirStat config file (`~/.config/QDirStat/QDirStat.conf`) and - enable it again: - - UseTreemapHover=true - - _Update 2018-10-20: This can now be changed in the new "General" page of - the configuration dialog; no need to edit the config file manually._ - - -- 2018-10-18 - - - Added support for the _pacman_ package manager for Manjaro and Arch Linux. - - This should now cover the most common package managers for Linux to find - out what package a system file belongs to: _dpkg_, _rpm_, _pacman_. - - As mentioned before, higher-level package managers such as _apt_, _zypper_, - _yum_ or front-ends like _synaptic_, _PackageKit_ all use one of the - lower-level package managers internally, so it doesn't matter if you never - used one of the lower-level tools before. - - - Tried to add support for the _pkg_ package manager ("pkg info") for FreeBSD - / OpenBSD, but unfortunately it only knows what package owns files of - _ports_ / _3rd party_, not for the base system. - - The helpful people in the _#freebsd_ IRC channel on _freenode_ confirmed - that. So this will have to wait until there is useful support for it from - the system side on those platforms. _BSD people, let me know!_ - - -- 2018-10-16 - - - QDirStat now shows `[root]` in the window title if it is running with root - privileges. - - - If invoked with `sudo`, now restoring the owner of the config files to the - real user (if possible) if those file are in the user's home directory. - Previously on some systems they were owned by _root_ which meant they were - no longer writable by the real user, silently discarding all subsequent - changes to the configuration (including window sizes etc). - - This might be different depending on how `sudo` is configured on a system; - on SUSE, it uses the root user's home directory, on Ubuntu, the home - directory of the user who invoked `sudo`. - - -- 2018-10-07 - - Added better classification of files to the new file details view: - - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) - - - MIME Category - this is the same as in the treemap colors, the same as you - can configure in the _MIME Categories_ page in the QDirStat configuration - dialog. By default, it shows very broad categories ("Documents, "Music", - "Images", "Videos", "Source Files", ...), but you can configure them to - much finer detail if you wish. - - - System file or not. This is important if you want to run any cleanup - actions in that directory; you probably don't want to mess with system - files, even if running QDirStat as root. - - A system file in this context is a file that is either owned by a system - user (a UID < 500) or that is located in a known system directory (/usr, - /lib, ..., but not /usr/local). - - - For system files, the package that this file belongs to. This gives a - surprising amount of insight (it was surprising to me, at least) where all - the disk space on the system directories goes to, most importantly some of - the big blobs in the tremap. - - As of now, this is supported for Linux systems using a package manager - based on _dpkg_ or on _rpm_: - - - Debian - - - Ubuntu / Kubuntu / Xubuntu / Lubuntu - - - SUSE (openSUSE Tumbleweed or Leap, SLES) - - - Red Hat (Fedora, RHEL) - - ... and dozens more (basically all that are based on any of the above). - - This works by running `dpkg -S` or `rpm -qf` as external commands, so this - is a somewhat expensive operation. To keep the user interface responsive, - QDirStat now has an "adaptive timer" for updating that information: - Normally, the result is shown instantly, but if you click around wildly, - there is a timer that is increased or decreased (thus "adaptive") for a - delayed update after that timeout (0 / 333 / 1000 / 2500 millisec right - now). - - It can even handle _rpm_ installed as a foreign package manager on a _dpkg_ - based system (and the other way round); it tries the primary package - manager first, then any others that are also installed. - - Please notice that _apt_, _synaptic_, _zypper_, _pkgkit_ and whatnot are - all higher level package managers that ultimately use one of the low level - ones, so even if you only use a higher level package manager, it still - works without restriction. - - If your system does not use _dpkg_ or _rpm_, those who can are invited to - contribute patches for other package managers; it's really simple: - - https://github.com/shundhammer/qdirstat/blob/master/src/PkgManager.cpp#L140 - - The API is not final yet; there may be more regexp support in the near - future (so it will only get simpler). But you get the idea. - --------------------------------------------------- - -- 2018-10-03 - - - Added a new details view next to the tree view. - Of course this can be disabled (Menu _View_ -> uncheck _Show Details Panel_). - - This view shows context-sensitive information about the currently selected - item(s); see also the screenshots (still not complete, but you get the idea): - - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-file-L2.png) - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-dir.png) - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-dot-entry.png) - [](https://raw.githubusercontent.com/shundhammer/qdirstat/master/screenshots/QDirStat-details-multi-sel.png) - - What that details view displays so far: - - - File: name, type (file / symlink / block device / character device / - FIFO), size, user, group, permissions both as rwxrwxrwx and octal, - modification time. - - - Directory: name with appended slash to easier recognize what it is, type - (directory), subtree total size, total items, total files, total - subdirs, latest modification time in the entire subtree; directory own - size, user, group, permissions both as rwxrwxrwx and octal, modification - time of the directory node itself (that was never shown before). - - - pseudo directory: Only the subtree information like for a - directory, but no user / group / permissions since there is no - counterpart for it on the filesystem. - - - Multi-selection: Number of selected items, total size, number of files, - number of directories, number of files in any subtrees of those - directories. This should show a bit more clearly what is affected if you - choose to delete all that selected stuff. - - The view can scroll, so extremely long file names (as are common e.g. below - `.git/objects` directories don't blow this view up to take all the screen - space away from the tree and the treemap. - - - - Unified the different size columns into one: No more "Subtree Size" and - "Own Size" separately, but now just "Size". The reasoning used to be that - there was no way to tell how large the directory node itself was. But that - information is now readily available in the details view if anybody is - really interested. - - Plans for the immediate future: - - - Add some package manager support, at least for the very common ones on - Linux (_deb_ and _rpm_ so far): Find out what package a system file belongs - to and show it (on demand or after a short delay) in the details view. This - can be done even as non-root with some commands like `dpkg -S` or `rpm - -qf`. There will probably be support for adding your own command lines in - the config file if you use another package manager. - - - Some simple checks if a file is probably a system file; for example, files - below `/usr/bin` (and other very common system directories) and/or files - that are owned by a user with a UID < 500 (or so) are very likely system - files that should be very careful to delete. The details view should show - you that; maybe there should also be a warning in the cleanup actions if - any such files are affected by a potentially destructive cleanup action. - - - Easily switchable different layouts for the tree columns and the details - view: - - - Minimalistic: Only the bare essentials of columns plus the details view. - - This should remove a lot of the current clutter on the screen, and it - should display the same information, only rearranged a bit. How often do - you really need fields like number of items / files / subdirs in the tree - view? They would be most useful there if you wish to sort the tree after - any of them. How often do you do that? And with the new details view, the - information is still available, but does not clutter the table. - - - Default: Pretty much what you can see now in the new screenshots - - - Maximum information: All columns, including the new user / group / - permissions columns, but (to make space) no details view - - If it makes sense (not sure yet), maybe also user defined views (say, 3 of - them?) that you can define to your personal liking. I kinda like how camera - makers use that (U1 / U2 on Nikon cameras, C1 / C2 / C3 on Canon and - Panasonic). I am not completely sure yet just how useful that is; I'll need - to experiment. - - -- 2018-10-02 Implemented a _breadcrumbs_ widget to show the current path and - for easier navigation up the directory hierarchy. See also the new - screenshots. - - Of course this can be disabled (Menu _View_ -> uncheck _Show Current Path_). - - -- 2018-09-27 Fixed [GitHub issue #84](https://github.com/shundhammer/qdirstat/issues/84): - Crash if picking up a cache file in the starting directory (subtree root). - - This was a crash that happened when users had used the supplied - _qdirstat-cache-writer_ script to generate cache files in certain directories - for faster directory scanning (at the price of having slightly outdated - data), and QDirStat was not started with that cache file as a command line - argument, but it would find it while reading the directory at the starting - directory (and only there). This was probably broken for a long time, yet - nobody had noticed (or nobody bothered to write a bug report). This might be - an indication that this cache file feature is not widely used, so only a - small number of users seem to be affected. Anyway, this is now fixed. - - -- 2018-09-23 Implemented [GitHub issue #80](https://github.com/shundhammer/qdirstat/issues/80): - Show directory/file user (owner), group and permissions in the tree view. - - Those new columns are not visible by default. Use the context menu in the - tree columns header to enable them. They might be useful for some users; for - others, they may be just more clutter being displayed. - - Sorting by those colums is somewhat basic; both user and group are sorted by - the numeric uid or guid; the permissions are sorted by the numeric value of - the mode field. Looking up user or group names is a somewhat costly - operation. It might also make sense to order system files first (user with - UID 0, i.e. root; other system users also have small UIDs.) - - See issue #80 for a screenshot. - - -- 2018-08-26 Noah Davis (noahdvs) contributed a new application icon for QDirStat: - - - - I had made the old icon myself back in early 2000 for the first KDirStat 0.86 - release. I never liked it very much, but the new application just needed an - icon. Finally somebody with more artistic talent than myself made one that - looks a lot more professional. Thank you, Noah! - - -- 2018-04-26 Implemented [GitHub issue #77](https://github.com/shundhammer/qdirstat/issues/77): - Show the current URL in the window title. This is disabled by default. - You can enable it manually in the config file (`~/.config/QDirStat/QDirStat.conf`): - - [MainWindow] - ... - UrlInWindowTitle=true - - Some day this will be configurable in a new tab in the configuration dialog, - but right now there are only so few options that would go to such a "General" - or "Misc" tab that it would look pretty lost and unorganized. - - -- 2018-02-08 Fixed [GitHub issue #74](https://github.com/shundhammer/qdirstat/issues/74): -Crash deleting folder while scan is in progress - - This fix comes on two levels: - - - A fix on the GUI-level that simply makes sure that the "move to trash" - action in the tool bar / context menu is disabled while a directory tree is - read. - - - A fix on the low-level internal classes for the in-memory directory tree - and the read job queue: This now also makes sure that whenever a subtree is - deleted from the outside (e.g. because of cleanup actions), any pending - directory read jobs for that subtree are removed from the job queue. - -- 2018-02-03 Fixed [GitHub issue #72](https://github.com/shundhammer/qdirstat/issues/72): -Allow to specify install prefix - - You can now install to another location like `/usr/local` if desired. - The default remains `/usr`. See section _Install to a Custom Directory_. - - -- 2018-01-12 Some small fixes: - - - Fixed duplicate keyboard shortcut for actions "Stop Reading" (now: Ctrl-S) - and "Copy URL to Clipboard" (still Ctrl-C). - - - Fixed exclude rules not matching correctly against direct root directory - children: A rule that should match "/var" now works correctly. You'd need - to specify "//var" in the rule which of course was wrong. - - - Now only adding the default exclude rule ".snapshot" once. If you remove - that one, it should no longer keep reappearing if there are no other - exclude rules. - - - Fixed some minor issues in the exclude rule configuration dialog with some - widgets not being correctly disabled if they made no sense to use. - - -- 2017-06-04 **New stable release: V1.4** _See [DevHistory.md](doc/DevHistory.md) for older entries._ diff -Nru qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-dpkg qdirstat-1.6/scripts/pkg-tools/complete-filelist-dpkg --- qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-dpkg 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/scripts/pkg-tools/complete-filelist-dpkg 2019-07-22 12:46:55.000000000 +0000 @@ -19,7 +19,7 @@ create_tmpdir() { - test -d $TMPDIR || mkdir -p $TMPDIR + test -d $TMPDIR || mkdir -p -m 700 $TMPDIR test -d $TMPDIR || die "Can't create tmp dir $TMPDIR" } diff -Nru qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-pacman qdirstat-1.6/scripts/pkg-tools/complete-filelist-pacman --- qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-pacman 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/scripts/pkg-tools/complete-filelist-pacman 2019-07-22 12:46:55.000000000 +0000 @@ -24,7 +24,7 @@ create_tmpdir() { - test -d $TMPDIR || mkdir -p $TMPDIR + test -d $TMPDIR || mkdir -p -m 700 $TMPDIR test -d $TMPDIR || die "Can't create tmp dir $TMPDIR" } diff -Nru qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-rpm qdirstat-1.6/scripts/pkg-tools/complete-filelist-rpm --- qdirstat-1.5.91/scripts/pkg-tools/complete-filelist-rpm 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/scripts/pkg-tools/complete-filelist-rpm 2019-07-22 12:46:55.000000000 +0000 @@ -24,7 +24,7 @@ create_tmpdir() { - test -d $TMPDIR || mkdir -p $TMPDIR + test -d $TMPDIR || mkdir -p -m 700 $TMPDIR test -d $TMPDIR || die "Can't create tmp dir $TMPDIR" } diff -Nru qdirstat-1.5.91/scripts/pkg-tools/show-unpkg-files qdirstat-1.6/scripts/pkg-tools/show-unpkg-files --- qdirstat-1.5.91/scripts/pkg-tools/show-unpkg-files 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/scripts/pkg-tools/show-unpkg-files 2019-07-22 12:46:55.000000000 +0000 @@ -27,7 +27,7 @@ create_tmpdir() { - test -d $TMPDIR || mkdir -p $TMPDIR + test -d $TMPDIR || mkdir -p -m 700 $TMPDIR test -d $TMPDIR || die "Can't create tmp dir $TMPDIR" } diff -Nru qdirstat-1.5.91/src/Attic.cpp qdirstat-1.6/src/Attic.cpp --- qdirstat-1.5.91/src/Attic.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/Attic.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -22,6 +22,15 @@ { _name = atticName(); _isIgnored = true; + + if ( parent ) + { + _device = parent->device(); + _mode = parent->mode(); + _uid = parent->uid(); + _gid = parent->gid(); + _mtime = 0; + } } diff -Nru qdirstat-1.5.91/src/CleanupCollection.cpp qdirstat-1.6/src/CleanupCollection.cpp --- qdirstat-1.5.91/src/CleanupCollection.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/CleanupCollection.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -316,7 +316,7 @@ { FileInfo * item = items.first(); - if ( item->isDir() || item->isDotEntry() ) + if ( item->isDir() || item->isPseudoDir() ) msg += tr( "

%1

for directory %2" ).arg( title ).arg( item->url() ); else msg += tr( "

%1

for file %2" ).arg( title ).arg( item->url() ); diff -Nru qdirstat-1.5.91/src/Cleanup.cpp qdirstat-1.6/src/Cleanup.cpp --- qdirstat-1.5.91/src/Cleanup.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/Cleanup.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -152,7 +152,7 @@ if ( ! item->isDir() && ! item->isPseudoDir() ) { - dir.replace ( QRegExp ( "/[^/]*$" ), "" ); + dir.replace( QRegExp ( "/[^/]*$" ), "" ); } return dir; diff -Nru qdirstat-1.5.91/src/DirInfo.cpp qdirstat-1.6/src/DirInfo.cpp --- qdirstat-1.5.91/src/DirInfo.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DirInfo.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -809,20 +809,26 @@ { _touched = false; - if ( recursive && ! isDotEntry() ) + if ( recursive ) { - FileInfo * child = _firstChild; + if ( ! isDotEntry() ) + { + FileInfo * child = _firstChild; + + while ( child ) + { + if ( child->isDirInfo() ) + child->toDirInfo()->clearTouched(); + + child = child->next(); + } + + if ( _dotEntry ) + _dotEntry->clearTouched(); + } - while ( child ) - { - if ( child->isDirInfo() ) - child->toDirInfo()->clearTouched(); - - child = child->next(); - } - - if ( _dotEntry ) - _dotEntry->clearTouched(); + if ( _attic ) + _attic->clearTouched(); } } @@ -929,21 +935,27 @@ // any in the subtree, either. And dot entries don't have dir children // that could have a sort cache. - if ( recursive && ! isDotEntry() ) - { - FileInfo * child = _firstChild; - - while ( child ) - { - if ( child->isDirInfo() ) - child->toDirInfo()->dropSortCache( recursive ); - - child = child->next(); - } - - if ( _dotEntry ) - _dotEntry->dropSortCache( recursive ); - } + if ( recursive ) + { + if ( ! isDotEntry() ) + { + FileInfo * child = _firstChild; + + while ( child ) + { + if ( child->isDirInfo() ) + child->toDirInfo()->dropSortCache( recursive ); + + child = child->next(); + } + + if ( _dotEntry ) + _dotEntry->dropSortCache( recursive ); + } + + if ( _attic ) + _attic->dropSortCache( recursive ); + } } } diff -Nru qdirstat-1.5.91/src/DirReadJob.cpp qdirstat-1.6/src/DirReadJob.cpp --- qdirstat-1.5.91/src/DirReadJob.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DirReadJob.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -397,8 +397,14 @@ { logDebug() << "Clearing complete tree" << endl; - _tree->clear(); - _tree->readCache( cacheFullName ); + _tree->clearAndReadCache( cacheFullName ); + + // Since this clears the tree and thus the job queue and thus + // deletes this read job, it is important not to do anything after + // this point that might access any member variables or even just + // uses any virtual method. + + return true; } else { diff -Nru qdirstat-1.5.91/src/DirTree.cpp qdirstat-1.6/src/DirTree.cpp --- qdirstat-1.5.91/src/DirTree.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DirTree.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -440,6 +440,13 @@ } +void DirTree::clearAndReadCache( const QString & cacheFileName ) +{ + clear(); + readCache( cacheFileName ); +} + + void DirTree::readPkg( const PkgFilter & pkgFilter ) { clear(); diff -Nru qdirstat-1.5.91/src/DirTree.h qdirstat-1.6/src/DirTree.h --- qdirstat-1.5.91/src/DirTree.h 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DirTree.h 2019-07-22 12:46:55.000000000 +0000 @@ -276,6 +276,11 @@ **/ void readCache( const QString & cacheFileName ); + /** + * Clear the tree and read a cache file. + **/ + void clearAndReadCache( const QString & cacheFileName ); + /** * Read installed packages that match the specified PkgFilter and their * file lists from the system's package manager(s). diff -Nru qdirstat-1.5.91/src/DirTreeModel.cpp qdirstat-1.6/src/DirTreeModel.cpp --- qdirstat-1.5.91/src/DirTreeModel.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DirTreeModel.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -683,7 +683,7 @@ case TotalItemsCol: return prefix + QString( "%1" ).arg( item->totalItems() ); case TotalFilesCol: return prefix + QString( "%1" ).arg( item->totalFiles() ); case TotalSubDirsCol: - if ( item->isPseudoDir() ) + if ( item->isDotEntry() ) return QVariant(); else return prefix + QString( "%1" ).arg( item->totalSubDirs() ); diff -Nru qdirstat-1.5.91/src/DotEntry.cpp qdirstat-1.6/src/DotEntry.cpp --- qdirstat-1.5.91/src/DotEntry.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/DotEntry.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -29,7 +29,7 @@ _mode = parent->mode(); _uid = parent->uid(); _gid = parent->gid(); - _mtime = parent->mtime(); + _mtime = 0; } } diff -Nru qdirstat-1.5.91/src/FileDetailsView.cpp qdirstat-1.6/src/FileDetailsView.cpp --- qdirstat-1.5.91/src/FileDetailsView.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/FileDetailsView.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -274,7 +274,7 @@ setCurrentPage( _ui->dirDetailsPage ); - QString name = dir->isPseudoDir() ? dir->name() : ( dir->baseName() + "/" ); + QString name = dir->isPseudoDir() ? dir->name() : ( dir->baseName() + "/" ); QString dirType = dir->isPseudoDir() ? tr( "Pseudo Directory" ) : tr( "Directory" ); setLabelLimited(_ui->dirNameLabel, name ); diff -Nru qdirstat-1.5.91/src/FileInfo.cpp qdirstat-1.6/src/FileInfo.cpp --- qdirstat-1.5.91/src/FileInfo.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/FileInfo.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -201,7 +201,7 @@ { QString parentUrl = _parent->url(); - if ( isDotEntry() || isAttic() ) // don't append "/." for dot entries and attics + if ( isPseudoDir() ) // don't append "/." for dot entries and attics return parentUrl; if ( ! parentUrl.endsWith( "/" ) && ! _name.startsWith( "/" ) ) @@ -408,7 +408,7 @@ bool FileInfo::isCached() const { - if ( isDirInfo() && ! isDotEntry() ) + if ( isDirInfo() && ! isPseudoDir() ) return readState() == DirCached; else return _parent && _parent->readState() == DirCached; diff -Nru qdirstat-1.5.91/src/FileInfoSet.cpp qdirstat-1.6/src/FileInfoSet.cpp --- qdirstat-1.5.91/src/FileInfoSet.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/FileInfoSet.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -55,15 +55,15 @@ foreach ( FileInfo * item, *this ) { - if ( item->checkMagicNumber() ) - { - logDebug() << "Keeping " << item << endl; - result << item; - } - else - { - logDebug() << "Removing invalid item" << endl; - } + if ( item->checkMagicNumber() ) + { + logDebug() << "Keeping " << item << endl; + result << item; + } + else + { + logDebug() << "Removing invalid item" << endl; + } } return result; @@ -79,6 +79,18 @@ } +bool FileInfoSet::containsPseudoDir() const +{ + foreach ( FileInfo * item, *this ) + { + if ( item && item->isPseudoDir() ) + return true; + } + + return false; +} + + bool FileInfoSet::containsDotEntry() const { foreach ( FileInfo * item, *this ) @@ -87,6 +99,18 @@ return true; } + return false; +} + + +bool FileInfoSet::containsAttic() const +{ + foreach ( FileInfo * item, *this ) + { + if ( item && item->isAttic() ) + return true; + } + return false; } diff -Nru qdirstat-1.5.91/src/FileInfoSet.h qdirstat-1.6/src/FileInfoSet.h --- qdirstat-1.5.91/src/FileInfoSet.h 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/FileInfoSet.h 2019-07-22 12:46:55.000000000 +0000 @@ -37,11 +37,6 @@ FileInfo * first() const; /** - * Return 'true' if the set contains any dot entry. - **/ - bool containsDotEntry() const; - - /** * Return 'true' if the set contains any directory item. **/ bool containsDir() const; @@ -57,10 +52,26 @@ **/ bool containsSpecial() const; - /** - * Return 'true' if the set contains any PkgInfo item. - **/ - bool containsPkg() const; + /** + * Return 'true' if the set contains any PkgInfo item. + **/ + bool containsPkg() const; + + /** + * Return 'true' if the set contains any pseudo directory, i.e. any dot + * entry ("") or attic ("). + **/ + bool containsPseudoDir() const; + + /** + * Return 'true' if the set contains any dot entry ("). + **/ + bool containsDotEntry() const; + + /** + * Return 'true' if the set contains any attic (""). + **/ + bool containsAttic() const; /** * Return the sum of all total sizes in the set. @@ -87,17 +98,17 @@ **/ bool treeIsBusy() const; - /** - * Return a set with all the invalid items removed, i.e. without items - * where checkMagicNumber() returns 'false'. - * - * If there is reason to believe that any items of the set might have - * become invalid, call this first before any other operations. - * - * Notice that this does not modify the existing set, but you can - * of course assign the result of this to the set. - **/ - FileInfoSet invalidRemoved() const; + /** + * Return a set with all the invalid items removed, i.e. without items + * where checkMagicNumber() returns 'false'. + * + * If there is reason to believe that any items of the set might have + * become invalid, call this first before any other operations. + * + * Notice that this does not modify the existing set, but you can + * of course assign the result of this to the set. + **/ + FileInfoSet invalidRemoved() const; /** * Return a 'normalized' set, i.e. with all items removed that have diff -Nru qdirstat-1.5.91/src/MainWindow.cpp qdirstat-1.6/src/MainWindow.cpp --- qdirstat-1.5.91/src/MainWindow.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/MainWindow.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -402,11 +402,11 @@ FileInfo * sel = selectedItems.first(); int selSize = selectedItems.size(); - bool oneDirSelected = selSize == 1 && sel && sel->isDir() && ! sel->isPkgInfo(); - bool dotEntrySelected = selectedItems.containsDotEntry(); - bool pkgSelected = selectedItems.containsPkg(); + bool oneDirSelected = selSize == 1 && sel && sel->isDir() && ! sel->isPkgInfo(); + bool pseudoDirSelected = selectedItems.containsPseudoDir(); + bool pkgSelected = selectedItems.containsPkg(); - _ui->actionMoveToTrash->setEnabled( sel && ! dotEntrySelected && ! pkgSelected && ! reading ); + _ui->actionMoveToTrash->setEnabled( sel && ! pseudoDirSelected && ! pkgSelected && ! reading ); _ui->actionRefreshSelected->setEnabled( oneDirSelected && ! sel->isExcluded() && ! sel->isMountPoint() && ! pkgView ); _ui->actionContinueReadingAtMountPoint->setEnabled( oneDirSelected && sel->isMountPoint() ); _ui->actionReadExcludedDirectory->setEnabled ( oneDirSelected && sel->isExcluded() ); diff -Nru qdirstat-1.5.91/src/Refresher.cpp qdirstat-1.6/src/Refresher.cpp --- qdirstat-1.5.91/src/Refresher.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/Refresher.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -59,7 +59,7 @@ { FileInfo * parent = child->parent(); - if ( parent->isDotEntry() ) + if ( parent->isPseudoDir() ) parent = parent->parent(); if ( parent ) diff -Nru qdirstat-1.5.91/src/SelectionModel.cpp qdirstat-1.6/src/SelectionModel.cpp --- qdirstat-1.5.91/src/SelectionModel.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/SelectionModel.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -238,7 +238,7 @@ { dir = current->isDirInfo() ? current->toDirInfo() : current->parent(); - if ( dir && dir->isDotEntry() ) + if ( dir && dir->isPseudoDir() ) dir = dir->parent(); // Go one directory up from the current item as long as there is an diff -Nru qdirstat-1.5.91/src/SystemFileChecker.cpp qdirstat-1.6/src/SystemFileChecker.cpp --- qdirstat-1.5.91/src/SystemFileChecker.cpp 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/SystemFileChecker.cpp 2019-07-22 12:46:55.000000000 +0000 @@ -21,7 +21,7 @@ if ( ! file ) return false; - if ( file->isDotEntry() && file->parent() ) + if ( file->isPseudoDir() && file->parent() ) file = file->parent(); QString path = file->url(); diff -Nru qdirstat-1.5.91/src/Version.h qdirstat-1.6/src/Version.h --- qdirstat-1.5.91/src/Version.h 2019-07-12 13:49:43.000000000 +0000 +++ qdirstat-1.6/src/Version.h 2019-07-22 12:46:55.000000000 +0000 @@ -9,9 +9,9 @@ #ifndef Version_h #define Version_h -#define QDIRSTAT_VERSION "1.5.91-git" +#define QDIRSTAT_VERSION "1.6" -#define RELEASE_VERSION "1.5" +#define RELEASE_VERSION "1.6" #define RELEASE_BASE_URL "https://github.com/shundhammer/qdirstat/releases/tag/" #define RELEASE_URL RELEASE_BASE_URL RELEASE_VERSION