View Issue Details

IDProjectCategoryView StatusLast Update
0006209Zer0Bugpublic2020-11-12 22:32
Reporterscx Assigned ToKyle_Katarn  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.21 
Fixed in Version0.22 
Summary0006209: Zer0 ignores command line arguments to a null-sized file
DescriptionI am unable to pass any file to Zer0 via CLI. The shell context menu doesn't work as well. It starts the program, but with an empty list.

Affected version: 0.21.0.24 (2020-10-02)
Windows version: Windows 10 Pro 20H2 EN 64-bit
Steps To Reproduce0. Install Zer0
1. Select any file in File Manager.
2. Open context menu.
3. Select "Delete with Zer0".

You can also try to use command line:
"C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" "C:\Path\to\File.ext"

Please keep in mind that this is identical with the "(Default)" key of "HKEY_CLASSES_ROOT\*\shell\Delete with Zer0\command":
"C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" "%1"
Additional InformationExpected results:
The file list filled with arguments passed by CLI args.

Actual results:
Empty list

However, it works if Zer0 is already running. In other words, command line arguments are ignored if and only if program wasn't running.
Tagscli, command, context menu, shell menu

Relationships

related to 0006210 resolvedKyle_Katarn When cmdline argument is received from another instance, no check on file existance (or special commands) 

Activities

scx

2020-11-10 13:10

reporter   ~0004068

Temporary solution (workaround):
"C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" & sleep 1 & "C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" "C:\Path\to\File.ext"
or just:
"C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" & "C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" "C:\Path\to\File.ext"

Kyle_Katarn

2020-11-10 21:24

administrator   ~0004069

What does Zer0 log file says after calling it with a file as 1st argument ? (?>Open log)

scx

2020-11-11 02:54

reporter   ~0004070

Screenshot:
https://i.ibb.co/1rqJp1n/Zer0.png

Log ("C:\Users\scx\AppData\Roaming\KC Softwares\Zer0\Zer0.log"):
https://pastebin.com/raw/qZuLRBJn

Log content:
Info [20-11-11 02:40:02] Zer0 is already up to date.
Info [20-11-11 02:40:02] Zer0 Update self check : Server replied 0.21.0.24 in 281ms
Info [20-11-11 02:40:01] Zer0 Update self check : Initialization
Info [20-11-11 02:40:01] Self update check...
Info [20-11-11 02:40:01] OpenSSL : OpenSSL 1.1.1g 21 Apr 2020
Info [20-11-11 02:40:01] C:\Users\scx\Documents\test.txt
Info [20-11-11 02:40:01] Portable : No
Info [20-11-11 02:40:01] Administrator : No
Info [20-11-11 02:40:01] 64Bits : Yes
Info [20-11-11 02:40:01] Windows : 10.0 (Windows10)
Info [20-11-11 02:40:01] Zer0 v0.21.0.24
Info [20-11-11 02:40:01] C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe
Info [20-11-11 02:40:01] Starting
Zer0.png (17,736 bytes)   
Zer0.png (17,736 bytes)   
Zer0.log (704 bytes)   
Info	[20-11-11 02:40:02]	Zer0 is already up to date.
Info	[20-11-11 02:40:02]	Zer0 Update self check : Server replied 0.21.0.24 in 281ms
Info	[20-11-11 02:40:01]	Zer0 Update self check : Initialization
Info	[20-11-11 02:40:01]	Self update check...
Info	[20-11-11 02:40:01]	OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
Info	[20-11-11 02:40:01]	C:\Users\scx\Documents\test.txt
Info	[20-11-11 02:40:01]	Portable : No
Info	[20-11-11 02:40:01]	Administrator : No
Info	[20-11-11 02:40:01]	64Bits : Yes
Info	[20-11-11 02:40:01]	Windows : 10.0 (Windows10)
Info	[20-11-11 02:40:01]	Zer0 v0.21.0.24
Info	[20-11-11 02:40:01]	C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe
Info	[20-11-11 02:40:01]	Starting
Zer0.log (704 bytes)   

scx

2020-11-11 03:03

reporter   ~0004071

And there are results with my fixes (see: Zer0.reg, Zer0.bat, Zer0.ps1):

Screenshot:
https://i.ibb.co/ZHR10sM/Zer0.png

Log ("C:\Users\scx\AppData\Roaming\KC Softwares\Zer0\Zer0.log"):
https://pastebin.com/raw/c5L0bQTK

Log content:
Info [20-11-11 02:52:47] Zer0 is already up to date.
Info [20-11-11 02:52:47] Zer0 Update self check : Server replied 0.21.0.24 in 375ms
Info [20-11-11 02:52:47] File received : C:\Users\scx\Documents\test.txt
Info [20-11-11 02:52:47] Zer0 Update self check : Initialization
Info [20-11-11 02:52:47] Self update check...
Info [20-11-11 02:52:47] OpenSSL : OpenSSL 1.1.1g 21 Apr 2020
Info [20-11-11 02:52:47] Portable : No
Info [20-11-11 02:52:47] Administrator : No
Info [20-11-11 02:52:47] 64Bits : Yes
Info [20-11-11 02:52:47] Windows : 10.0 (Windows10)
Info [20-11-11 02:52:47] Zer0 v0.21.0.24
Info [20-11-11 02:52:47] C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe
Info [20-11-11 02:52:47] Starting
Zer0.bat (118 bytes)   
@echo off
Powershell.exe -executionpolicy remotesigned -File "C:\Program Files (x86)\KC Softwares\Zer0\Zer0.ps1" %*
Zer0.bat (118 bytes)   
Zer0-2.log (720 bytes)   
Info	[20-11-11 02:52:47]	Zer0 is already up to date.
Info	[20-11-11 02:52:47]	Zer0 Update self check : Server replied 0.21.0.24 in 375ms
Info	[20-11-11 02:52:47]	File received : C:\Users\scx\Documents\test.txt
Info	[20-11-11 02:52:47]	Zer0 Update self check : Initialization
Info	[20-11-11 02:52:47]	Self update check...
Info	[20-11-11 02:52:47]	OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
Info	[20-11-11 02:52:47]	Portable : No
Info	[20-11-11 02:52:47]	Administrator : No
Info	[20-11-11 02:52:47]	64Bits : Yes
Info	[20-11-11 02:52:47]	Windows : 10.0 (Windows10)
Info	[20-11-11 02:52:47]	Zer0 v0.21.0.24
Info	[20-11-11 02:52:47]	C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe
Info	[20-11-11 02:52:47]	Starting
Zer0-2.log (720 bytes)   
Zer0-2.png (18,768 bytes)   
Zer0-2.png (18,768 bytes)   
Zer0.ps1 (134 bytes)   
& "C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe"
Start-Sleep -s 1
& "C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe" $args
Zer0.ps1 (134 bytes)   
Zer0.reg (448 bytes)   
��Windows Registry Editor Version 5.00



[HKEY_CLASSES_ROOT\*\shell\ZZZZ0010FileActions\shell\ZZZZ001011Zer0\command]

@="\"C:\\SilentCMD\\SilentCMD.exe\" \"C:\\Program Files (x86)\\KC Softwares\\Zer0\\Zer0.bat\" \"%1\""



Zer0.reg (448 bytes)   

scx

2020-11-11 03:08

reporter   ~0004072

The difference:

Fist attempt:
Info [20-11-11 02:40:01] C:\Users\scx\Documents\test.txt

Second attempt:
Info [20-11-11 02:52:47] File received : C:\Users\scx\Documents\test.txt

scx

2020-11-11 04:11

reporter   ~0004073

The difference:
$ diff -Nau <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log1/Zer0.log ) <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log2/Zer0.log )
--- /dev/fd/63 2020-11-11 03:16:37.000000000 +0100
+++ /dev/fd/62 2020-11-11 03:16:37.000000000 +0100
@@ -1,9 +1,9 @@
 Zer0 is already up to date.
-Zer0 Update self check : Server replied 0.21.0.24 in 281ms
+Zer0 Update self check : Server replied 0.21.0.24 in 375ms
+File received : C:\Users\scx\Documents\test.txt
 Zer0 Update self check : Initialization
 Self update check...
 OpenSSL : OpenSSL 1.1.1g 21 Apr 2020
-C:\Users\scx\Documents\test.txt
 Portable : No
 Administrator : No
 64Bits : Yes
info.txt (685 bytes)   
$ diff -Nau <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log1/Zer0.log ) <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log2/Zer0.log )
--- /dev/fd/63  2020-11-11 03:16:37.000000000 +0100
+++ /dev/fd/62  2020-11-11 03:16:37.000000000 +0100
@@ -1,9 +1,9 @@
 Zer0 is already up to date.
-Zer0 Update self check : Server replied 0.21.0.24 in 281ms
+Zer0 Update self check : Server replied 0.21.0.24 in 375ms
+File received : C:\Users\scx\Documents\test.txt
 Zer0 Update self check : Initialization
 Self update check...
 OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
-C:\Users\scx\Documents\test.txt
 Portable : No
 Administrator : No
 64Bits : Yes
info.txt (685 bytes)   
Meld.png (69,496 bytes)   
Meld.png (69,496 bytes)   
Zer0.diff (500 bytes)   
--- /dev/fd/63	2020-11-11 03:19:22.000000000 +0100
+++ /dev/fd/62	2020-11-11 03:19:22.000000000 +0100
@@ -1,9 +1,9 @@
 Zer0 is already up to date.
-Zer0 Update self check : Server replied 0.21.0.24 in 281ms
+Zer0 Update self check : Server replied 0.21.0.24 in 375ms
+File received : C:\Users\scx\Documents\test.txt
 Zer0 Update self check : Initialization
 Self update check...
 OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
-C:\Users\scx\Documents\test.txt
 Portable : No
 Administrator : No
 64Bits : Yes
Zer0.diff (500 bytes)   

scx

2020-11-11 04:21

reporter   ~0004074

I just found that this error occurs only if the file is empty (has 0 bytes). For non-empty files, it works OK.

scx

2020-11-11 04:29

reporter   ~0004075

$ diff -Nau <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log1/Zer0.log ) <( sed -re 's/[[:alnum:]]+[[:blank:]]+\[[^]]+][[:blank:]]*//' log3/Zer0.log )
--- /dev/fd/63 2020-11-11 04:25:42.000000000 +0100
+++ /dev/fd/62 2020-11-11 04:25:42.000000000 +0100
@@ -1,9 +1,10 @@
 Zer0 is already up to date.
-Zer0 Update self check : Server replied 0.21.0.24 in 281ms
+Zer0 Update self check : Server replied 0.21.0.24 in 313ms
 Zer0 Update self check : Initialization
 Self update check...
+File added (command line) : C:\Users\scx\Documents\test_non-empty.txt
 OpenSSL : OpenSSL 1.1.1g 21 Apr 2020
-C:\Users\scx\Documents\test.txt
+C:\Users\scx\Documents\test_non-empty.txt
 Portable : No
 Administrator : No
 64Bits : Yes
Zer0-3.log (810 bytes)   
Info	[20-11-11 04:23:54]	Zer0 is already up to date.
Info	[20-11-11 04:23:54]	Zer0 Update self check : Server replied 0.21.0.24 in 313ms
Info	[20-11-11 04:23:54]	Zer0 Update self check : Initialization
Info	[20-11-11 04:23:54]	Self update check...
Info	[20-11-11 04:23:54]	File added (command line) : C:\Users\scx\Documents\test_non-empty.txt
Info	[20-11-11 04:23:54]	OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
Info	[20-11-11 04:23:54]	C:\Users\scx\Documents\test_non-empty.txt
Info	[20-11-11 04:23:54]	Portable : No
Info	[20-11-11 04:23:54]	Administrator : No
Info	[20-11-11 04:23:54]	64Bits : Yes
Info	[20-11-11 04:23:54]	Windows : 10.0 (Windows10)
Info	[20-11-11 04:23:54]	Zer0 v0.21.0.24
Info	[20-11-11 04:23:54]	C:\Program Files (x86)\KC Softwares\Zer0\Zer0.exe
Info	[20-11-11 04:23:54]	Starting
Zer0-3.log (810 bytes)   
Zer0-3.png (18,660 bytes)   
Zer0-3.png (18,660 bytes)   
Zer0_non-empty.diff (566 bytes)   
--- /dev/fd/63	2020-11-11 04:26:30.000000000 +0100
+++ /dev/fd/62	2020-11-11 04:26:30.000000000 +0100
@@ -1,9 +1,10 @@
 Zer0 is already up to date.
-Zer0 Update self check : Server replied 0.21.0.24 in 281ms
+Zer0 Update self check : Server replied 0.21.0.24 in 313ms
 Zer0 Update self check : Initialization
 Self update check...
+File added (command line) : C:\Users\scx\Documents\test_non-empty.txt
 OpenSSL : OpenSSL 1.1.1g  21 Apr 2020
-C:\Users\scx\Documents\test.txt
+C:\Users\scx\Documents\test_non-empty.txt
 Portable : No
 Administrator : No
 64Bits : Yes
Zer0_non-empty.diff (566 bytes)   
Meld_non-empty.png (75,577 bytes)   
Meld_non-empty.png (75,577 bytes)   

Kyle_Katarn

2020-11-11 10:40

administrator   ~0004076

Good point, bug is confirmed.

Issue History

Date Modified Username Field Change
2020-11-10 12:55 scx New Issue
2020-11-10 12:55 scx Tag Attached: cli
2020-11-10 12:55 scx Tag Attached: command
2020-11-10 12:55 scx Tag Attached: context menu
2020-11-10 12:55 scx Tag Attached: shell menu
2020-11-10 13:10 scx Note Added: 0004068
2020-11-10 21:24 Kyle_Katarn Assigned To => Kyle_Katarn
2020-11-10 21:24 Kyle_Katarn Status new => feedback
2020-11-10 21:24 Kyle_Katarn Note Added: 0004069
2020-11-11 02:54 scx Note Added: 0004070
2020-11-11 02:54 scx File Added: Zer0.png
2020-11-11 02:54 scx File Added: Zer0.log
2020-11-11 03:03 scx Note Added: 0004071
2020-11-11 03:03 scx File Added: Zer0.bat
2020-11-11 03:03 scx File Added: Zer0-2.log
2020-11-11 03:03 scx File Added: Zer0-2.png
2020-11-11 03:03 scx File Added: Zer0.ps1
2020-11-11 03:03 scx File Added: Zer0.reg
2020-11-11 03:08 scx Note Added: 0004072
2020-11-11 04:11 scx Note Added: 0004073
2020-11-11 04:11 scx File Added: info.txt
2020-11-11 04:11 scx File Added: Meld.png
2020-11-11 04:11 scx File Added: Zer0.diff
2020-11-11 04:21 scx Note Added: 0004074
2020-11-11 04:29 scx Note Added: 0004075
2020-11-11 04:29 scx File Added: Zer0-3.log
2020-11-11 04:29 scx File Added: Zer0-3.png
2020-11-11 04:29 scx File Added: Zer0_non-empty.diff
2020-11-11 04:29 scx File Added: Meld_non-empty.png
2020-11-11 10:40 Kyle_Katarn Summary Zer0 ignores command line arguments => Zer0 ignores command line arguments to a null-sized file
2020-11-11 10:40 Kyle_Katarn Status feedback => acknowledged
2020-11-11 10:40 Kyle_Katarn Note Added: 0004076
2020-11-11 10:41 Kyle_Katarn Status acknowledged => confirmed
2020-11-11 10:42 Kyle_Katarn Relationship added related to 0006210
2020-11-12 22:32 Kyle_Katarn Status confirmed => resolved
2020-11-12 22:32 Kyle_Katarn Resolution open => fixed
2020-11-12 22:32 Kyle_Katarn Fixed in Version => 0.22