Closed muellerto closed 10 months ago
Looks like it's displaying actual disk usage (and your OS is reporting blocks of 1024k) instead of apparent sizes. What's the value of ApparentSize
in your config file? By default it's set to true
.
ApparentSize
was false
in my case.
When I set it true
the file sizes get much better (I would say they are correct).
ApparentSize
was always false
on this machine. I didn't change it as far as I can remember. But the file size display changed recently. So either clifm or the OS or my MinGW du has changed it's behavior. But who?
My MinGW du supports the parameter --apperent-size
. When I type du --apparent-size --bytes *.*
I get the exact sizes I want to have. But I get exactly the same correct results when I type du --bytes *.*
. When I type du *.*
I get kilo bytes, OK, but even these numbers are different from what clifm shows. In my picture above clifm shows both MainPage.html files as 8192 bytes while du says one file has 8 kB, the other one has 6 kB. Mysterious.
I let ApparentSize
be true
as long as I don't see problems with that. Thanks for the lead on that.
Glad it's working again. Just a few remarks:
ApparentSize
has always been set to true by default. There has been no change in this regard as far as I can remember.du
is only used to get directories size recursively, for example, when you run pp
on a directory).Please keep me informed about any unusual or unexpected behavior.
EDIT: Nope, it seems I was wrong: ApparentSize
was originally set to false
. However, the important thing is whether sizes are displayed correctly or not, i.e. respecting the user's settings.
As far as I can tell, the sizes shown in your screenshot are correct (file disk usage in blocks of 1024 bytes, which is Cygwin default block size (see the S_BLKSIZE macro in sys/stat.h
)). Also, setting ApparentSize
to true produced the right change: actual file sizes instead of disk usage. In any case, if these values were different before, without altering the value of ApparentSize
, it was a clifm bug that has been fixed.
EDIT2: Made a few tests on my Windows box. ApparentSize
was actually set to false; nonetheless, file sizes were as expected. Tried with both the latest version and 1.13.
ApparentSize
false
in the very beginning since it's comment was always "Linux only". And so it was at least for a year or so. I swear I didn't change it in the last weeks but the file size display changed recently. That was the reason for this issue.du
is mentioned in the comment of the ApparentSize
option in my not very actual clifmrc. (I should finally get an actual one ...) I don't know how or if du
is involved in anything at all but for the case it is I checked it's behavior.After all the behavior seems to be correct in both cases, ApparentSize=true
and ApparentSize=false
. It was probably not right before when it showed indeed exact bytes for a long time with ApparentSize=false
which has been the case on my machine until today. I always wanted exact bytes (we discussed this here and you implemented this feature) and suddenly not longer than a week ago I didn't have them anymore.
Describe the bug The file sizes (I use exact bytes) in the long view are not good anymore. It seems that they are always somehow rounded up to blocks of 1024 bytes.
To Reproduce Steps to reproduce the behavior:
PropFields
setting isfpmSx
p
orpp
- also wrongI checked also
s
inPropFields
, this is also not good anymore.Expected behavior Earlier versions of clifm showed exact file sizes correctly.
Screenshots The following picture shows clifm and
ls -l
with the same directory:All file sizes differ.
ls -l
shows the correct file sizes.Desktop: