Author Topic: BUG: Extracting from 7-Zip application doesn't work  (Read 67541 times)

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
BUG: Extracting from 7-Zip application doesn't work
« on: July 21, 2019, 16:40:04 »
Hello, I'm facing the bug where when I try to extract files from 7-Zip by dragging files from it's window into Multi Commander, some or all files are not extracted correctly (or at all).

I saw this thread: http://forum.multicommander.com/forum/index.php/topic,757.msg2170.html#msg2170

It has been 6 years. Can this be finally fixed? Other file managers that I tried are handling it correctly.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #1 on: July 22, 2019, 18:01:55 »
MC have built in support for 7zip , use that.

Problem is that 7Zip is doing it wrong. it is sending it as a drag and drop format that is not very good, 7Zip unpacks the files to temp location let drop target know that the files are here.
To let them be copyied again, then when the drop action is completed 7zip deletes it temp files. problem is that they are doing it before MC have had a time to copy them because MC copy files in the background, so 7zip deletes the files to soon. 
MC have no control over it
« Last Edit: July 22, 2019, 18:04:57 by Mathias (Author) »

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #2 on: July 22, 2019, 21:05:07 »
I understand that 7Zip might use problematic unpacking mechanism, but it is widely used software and obviously it's not going to be changed on the 7-zip side (as it works this way for all the years), so I think Multi Commander should handle it somehow, because other file managers are handling it correctly so as a result Multi Commander's behavior is broken. Worst is that user might not know that the operation wasn't really successful - I was so confused when I realized that the files weren't extracted correctly and some files were missing. I wouldn't expect that behavior. And seeing that it's this way for 6 years without any fix or workaround is really bad.

Your recommendation to use built in 7-zip support isn't comfortable at all for me. I usually download some archives via internet browser, then open them in own 7-zip window, navigate in file manager to specific folder, and then drag&drop them there. Having to search for the downloaded archives first takes 2x more time than drag&drop. But as I said, main problem is that it is broken in Multi Commander in a way that it looks like it's working, but in reality you get lost/corrupted files.

Can you please make it work somehow, even though it won't be ideal? For example make all these drag&drop operations blocking - it's much better to wait than to get corrupted/missing files.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #3 on: July 23, 2019, 09:06:24 »
I disagree that MC is broken. Making it work with 7zip will break it for other programs that uses that type of D&D data correct.

If I get the time I see if I can add switch and handle it in a bad way. But redesigning everything how copy is done just because 7zip is doing it wrong, Will not happen

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #4 on: July 23, 2019, 10:18:31 »
Actually I now remember, There is a workaround already added. I see if I can add a way to enable it easier..
However it have issue like
the datetime of the top level items from the 7zip is not kept
and it looks like it is moving the files (it is,. but from a temp location)
and if 7Zip temp location is not the same drive and MC then it will be a lot slower.

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #5 on: July 23, 2019, 20:45:53 »
Thanks for info. Can I enable that workaround somewhere in current version?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #6 on: July 24, 2019, 14:53:55 »
Thanks for info. Can I enable that workaround somewhere in current version?
The settings is not public and it will change behavior to always use that way , and that is not really good.
I add an option that will ask when dropping how to handle it. because you do not want to do it for other drop operations that are correct

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #7 on: July 24, 2019, 15:40:47 »
I see. Isn't there any "source" in the dropped data that would let you identify that it comes from 7-Zip, so you could use this workaround automatically in that case?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #8 on: July 24, 2019, 20:15:45 »
I see. Isn't there any "source" in the dropped data that would let you identify that it comes from 7-Zip, so you could use this workaround automatically in that case?
Nope.. 7Zip is so bad that they just emulate normal file drops.  You are not suppose to do that for temporary files, it is lazy.

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #9 on: July 24, 2019, 20:28:50 »
I also asked about this on 7-Zip bug tracker. I came to conclusion that deleting temporary files at exit (as WinRar does) instead of immediately would help in this situation.

Perhaps you can suggest some another solution/improvements there, if you know how to do it correctly/better?

See https://sourceforge.net/p/sevenzip/bugs/2210/

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #10 on: July 24, 2019, 23:38:15 »
Deleting them at exit would solve the issue and I think it is the easiest way

A better way would probably be to send the drop data as ISteam data via CF_FILECONTENTS Type of drag data. However.  That is complicated and would require a total rewrite on how they do it.
(it is the way outlook sends attachments when drag and dropping them) But their suggestion on deleting the temp files at program exit instead would solve the issue in a good enough way



robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #11 on: July 25, 2019, 11:33:34 »
Okay, so I'll be waiting for new build of Multi Commander with that workaround, and we'll see when they fix it in 7-Zip itself. Thanks :)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #12 on: July 25, 2019, 16:39:32 »
Okay, so I'll be waiting for new build of Multi Commander with that workaround, and we'll see when they fix it in 7-Zip itself. Thanks :)
It is added to the current Beta track (That is RC3 and will probably be the final version unless something critical is found)

robyer

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: BUG: Extracting from 7-Zip application doesn't work
« Reply #13 on: July 25, 2019, 17:39:49 »
It works. Thanks ;-)