Synchronize Dirs - Abort button doesnt work during unpacking

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Synchronize Dirs - Abort button doesnt work during unpacking

Post by *MarcinW »

Steps to reproduce:
1) Create ZIP archive containing large "test.bin" file (e.g. 300MB).
2) Display ZIP contents in left panel and the folder with original "test.bin" file in right panel.
3) Select "synchronize Dirs" command.
4) Check "by content" option.
5) Press "Compare" button.

Now in the status bar we can see: "Unpack: file.bin". Pressing "Abort" button will be ignored during whole unpacking process. It also won't be remembered. The only way to abort is to wait until unpacking finishes and press "Abort" button once again.

Regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently Abort only works between two unpacked files, sorry. I will check whether this could be changed.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

I hope it won't be too complicated, since TC already can unpack files in the background, without main thread blocking.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I checked my code: You should be able to use ESC during unpacking.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

I checked message handling with the Spy++ tool. Pressing Esc during unpacking doesn't somehow generate WM_CHAR message. You may want to check what is the difference in WM_KEYDOWN handling in both cases. Similar difference must be also for the Abort button.

Code: Select all

When not unpacking:

<00015> 000C0226 S ................WM_COMMAND wNotifyCode:0000 wID:488 hwndCtl:000B01E8
<00016> 00220208 S .................BM_SETSTATE fState:True
<00017> 00220208 R .................BM_SETSTATE
<00018> 000B01E8 S ..................BM_SETSTYLE dwStyle:BS_PUSHBUTTON fRedraw:True
<00019> 000B01E8 R ..................BM_SETSTYLE
<00020> 000B021E S ..................BM_SETSTYLE dwStyle:BS_DEFPUSHBUTTON fRedraw:True
<00021> 000B021E R ..................BM_SETSTYLE
<00022> 000D0206 S ..................WM_COMMAND wNotifyCode:0004 wID:486 hwndCtl:001401E6
<00023> 000D0206 R ..................WM_COMMAND
<00024> 001401E6 P WM_KEYDOWN nVirtKey:VK_ESCAPE cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00025> 001401E6 P WM_CHAR chCharCode:'' (27) cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00026> 001401E6 P WM_KEYUP nVirtKey:VK_ESCAPE cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
<00027> 000C0226 R ................WM_COMMAND
<00028> 000D0206 S .................WM_COMMAND wNotifyCode:0005 wID:486 hwndCtl:001401E6
<00029> 000D0206 R .................WM_COMMAND

Code: Select all

When unpacking:

<00007> 000E0206 S ................WM_COMMAND wNotifyCode:0000 wID:488 hwndCtl:000C01E8
<00008> 000D020C S ..................WM_COMMAND wNotifyCode:0004 wID:486 hwndCtl:001601E6
<00009> 000D020C R ..................WM_COMMAND
<00010> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A119C
<00011> 000D020C R .................WM_COMMAND
<00012> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0B74
<00013> 000D020C R .................WM_COMMAND
<00014> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00015> 000D020C R .................WM_COMMAND
<00016> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00017> 000D020C R .................WM_COMMAND
<00018> 001601E6 P WM_KEYDOWN nVirtKey:VK_ESCAPE cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00019> 000D020C S .................WM_COMMAND wNotifyCode:0 (sent from a menu) wID:2
<00020> 000D020C R .................WM_COMMAND
<00021> 001601E6 P WM_KEYUP nVirtKey:VK_ESCAPE cRepeat:1 ScanCode:01 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
<00022> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00023> 000D020C R .................WM_COMMAND
<00024> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00025> 000D020C R .................WM_COMMAND
<00026> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00027> 000D020C R .................WM_COMMAND
<00028> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00029> 000D020C R .................WM_COMMAND
<00030> 000D020C S .................WM_COMMAND wNotifyCode:0000 wID:120 hwndCtl:000A0880
<00031> 000D020C R .................WM_COMMAND
Post Reply