Ticket #3647 (new defect)

Opened 9 years ago

Last modified 17 months ago

MC summarizes hardlink sizes

Reported by: andrew_b Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc: egmont
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

$ mkdir xxx 
$ dd if=/dev/zero of=xxx/yyy bs=1000000 count=1
1+0 records in
1+0 records out
1000000 bytes (1.0 MB) copied, 0.000880908 s, 1.1 GB/s
$ ln xxx/yyy xxx/zzz
$ du xxx
988K	xxx

When press Ctrl-space on xxx directory, MC shows 2000000 as directory size.

MC should recognize hardlinks and shouldn't summarize size of hardlinks as though they are independent files.

Change History

comment:1 Changed 9 years ago by egmont

What to do if not all the hard links are from under the Ctrl-spaced directory?

What if multiple directories are being Ctrl-spaced and one link is under one, the other link is under the other?

$ mkdir aaa bbb
$ dd if=/dev/zero of=aaa/xxx bs=1000000 count=1
$ ln aaa/xxx bbb/yyy
$ du aaa
984	aaa
$ du bbb
984	bbb
$ du aaa bbb
984	aaa
4	bbb

Is the latter one okay for us too, if the user tags multiple files and then presses Ctrl-space? I don't like it, even though I have to admit I have no idea what to do.

comment:2 Changed 9 years ago by egmont

  • Cc egmont added

comment:3 Changed 3 years ago by zaytsev

Ticket #4290 has been marked as a duplicate of this ticket.

comment:4 Changed 17 months ago by birdie

And I wanted to file this bug report again ;-)

Note: See TracTickets for help on using tickets.