Ticket #3678 (closed defect: fixed)

Opened 8 years ago

Last modified 6 years ago

[MidnightCommander/mc] "Cannot make the hardlink" error popup is missing critical information and is not dismissable (#110)

Reported by: Petros Owned by: andrew_b
Priority: critical Milestone: 4.8.22
Component: mc-core Version: master
Keywords: Cc: nrbrtx@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

First: thank you for your hard work keeping mc up to date :)

Second:
I did open an issue on github, with detailed description, that was closed by Andrew Borodin with a note that I should open it here.

Unfortunately the issue is made unaccessible (most probably the whole issue tracking got disabled on github/mc), so I can't copypaste the content, please copy that here if you still have access or do have an email copy.

And the report:

Ubuntu14.04
$ mc --version
GNU Midnight Commander 4.8.11
Built with GLib 2.39.1
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

Usecase (from memory):

  • user tries to copy/move a whole directory from /mnt/disk1 to /mnt/disk2 (different disks, different partitions)
  • process starts, ETA is like 2 hours, user leaves computer
  • the source directory contains hardlinks (maybe 5 files are the same)
  • as target is on a different filesystem making hardlinks is not possible
  • mc pops up a dialog, that it cannot make the hardlink, and hangs.
    • bug1: The dialog has no options for the user, and it does not even contain the filenames, so the user won't know and can't do anything just dismiss the dialog
    • bug2: the dialog pops up again, with no way to disable this
    • bug3: the dialog does not tell the user what will happen (skip or copy). (Mc does a standard copy of the file, of course this is the expected result, but no information whatsoever)
  • user checks the computer 2 hours later, and finds mc hang on the first hardlink, where user has to press enter, and wait 2 hours OR risk hanging again.

So this is only a userinterface frustration:

  • no new information for the user
  • no questions asked
  • there is a trivial answer for the "what to do?"
  • mc already solves the problem by copying (see later for a better way)
  • makes the user go nuts if there are 2000 hardlinks :)

Correct solution:

  • if someone tries to copy/move files to an another partition he/she expects MC to create an exact replica. If technical issues happen and there's only one solution mc should do that to solve the problem. (create a standard file)
  • if it's a must to pop up a dialog, it should always contain the file that has the problem, and more than one option for the user to decide what to do, also for every option there should be an option to do that always (Skip, Skip All, Copy, Copy All, Abort...)
  • also it would be nice to set the default in configuration (like "make a copy of a hardlink if it's on a different filesystem" options: "always", "ask", "never", default: "always"), so the blocking popup would get eliminated from the workflow.

Optional feature:

  • if one user tries to copy 8 files that are hardlinks of the same file to a different filesystem, the copy should happen once, and 7 hardlinks should get created on the target filesystem, because that configuration is the closest to the original.

But for starting, please eliminate the errorpopup, every optimisation could get implemented later.

Thank you again,

Peter Kopias

Change History

comment:1 in reply to: ↑ description Changed 8 years ago by andrew_b

Replying to Petros:

GNU Midnight Commander 4.8.11

Please report bugs in recent version of MC here. 4.8.11 is about 3 years old.

  • user tries to copy/move a whole directory from /mnt/disk1 to /mnt/disk2 (different disks, different partitions)
  • process starts, ETA is like 2 hours, user leaves computer
  • the source directory contains hardlinks (maybe 5 files are the same)
  • as target is on a different filesystem making hardlinks is not possible

Works for me. MC creates hardlinks in destination partition to files in destination partitions not to files in source one.

Could you please provide the minimal directory tree with hardlinks to reproduce this bug?

comment:2 Changed 8 years ago by Petros

Okay, I'll try a newer version, and see if I can reproduce, then write the details here (or just close:invalid )

comment:3 Changed 8 years ago by andrew_b

  • Status changed from new to closed
  • Version changed from master to 4.8.11
  • Resolution set to worksforme
  • Milestone Future Releases deleted

comment:4 Changed 6 years ago by nrbrtx

  • Status changed from closed to reopened
  • Priority changed from minor to critical
  • Version changed from 4.8.11 to 4.8.15
  • Resolution worksforme deleted

Bug exists while using MC 4.8.15 on Ubuntu 16.04 LTS.
I asked MC to copy about 300 Gb of files (checked Follow links in Copy dialog) from ext4 to ext4.

This dialog:

Error
Cannot make hard link

prevents file copying.
To bypass it I need to place heavy object (150 gramms) directly on <RightArrow> (<→>) key. Are you serious?

I need to copy my files without any additional actions. I'm ready to select Skip All or something. But not to use physical hacks with my keyboard.

comment:5 Changed 6 years ago by nrbrtx

  • Cc nrbrtx@… added

comment:6 Changed 6 years ago by andrew_b

  • Status changed from reopened to accepted
  • Owner set to andrew_b
  • Version changed from 4.8.15 to master
  • Branch state changed from no branch to on review
  • Milestone set to 4.8.22
  • Keywords ui, popup, hardlink removed

Branch: 3678_hardlink_error
Initial changeset:3ed755ed9353e5ea98b7ea576cd12c6678b08167

Please test.

comment:7 Changed 6 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:8 Changed 6 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [edb89d55b8455bc030bbc77fe992836c6aacdd1d].

git log --pretty=oneline 49945f4..edb89d5

comment:9 Changed 6 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.