bamaer commented on PR #9024:
URL: https://github.com/apache/hop/pull/9024#issuecomment-6274838854

   Thanks @Adalennis, the label fixes and the Shell return-status fix are good 
catches. This only touches docs, so none of it can break anything. I checked 
every Result row against the action code on current main. The rows below say 
something different from what the code does.
   
   **Fix before merge**
   
   - **Zip file, False:** a source file that can't be *moved* after zipping 
does not make the action false. `moveFile` logs the error, and then 
`successResult = true` (`ActionZipFile.java:560`) overrides it, so the action 
is true and the zip is in the result files. A failed *delete* is false only 
because VFS throws. Suggest dropping "or moved" and adding a NOTE about it, 
like the ones on Move files.
   - **Zip file, True, "no file matches the wildcard (creates an empty zip)":** 
this only holds with *Include subfolders* off. With it on, the wildcard is 
applied in `findFiles`, so the list comes back empty and the action is false 
with no zip (`ActionZipFile.java:315-334`).
   - **Zip file, True with an empty source or with *Get arguments from 
previous*:** neither path ever sets the result (`ActionZipFile.java:917-994`), 
so the action passes on the previous action's true/false. After a failure or 
unconditional hop it is false, even when every row zipped fine. Suggest: "the 
result of the previous action is passed on."
   - **Move files NOTE, "counts as two errors":** this only happens when the 
entry is a single file. With a folder or wildcard source, an existing file 
counts once (`ActionMoveFiles.java:1043`).
   - **Delete files and Move files, *Copy previous results to args* in the 
Options table:** this row still says the files come from the result files. The 
code reads the result rows, as the new Result rows line says, so each page now 
contradicts itself.
   
   **Worth fixing**
   
   - **Shell:** with *Execute for every result row* and no result rows, the 
command doesn't run, and the previous result is passed on with no exit status 
(`ActionShell.java:298`).
   - **Shell, "could not be started … script file doesn't exist", Exit status 
not set:** that is true on Linux/macOS only. On Windows `cmd.exe /C` starts 
anyway and returns a non-zero exit code, which is then set as the exit status.
   
   I reviewed the code against main but didn't run it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to