Seems the bug is in the stock hfs.tpl
I tested using RAWR Designs' excellent "Live" template, and this confirmed that my bug is in the default hfs.tpl only, not intrinsic to the in the hfs server code.
I was hoping to find a simple example of the working logic for archives and deleting, but unfortunately the Live template is well beyond me; I could not even find their archiving and deleting code to compare it to the stock hfs.tpl version.
And, I while I haven't tried all of them yet, it seems most of the templates don't include the file-select-and-delete action. (Or, if they have it, I couldn't figure out how to access it as a logged-in user.)
The test case is: select some files, download an archvie, and then delete them. This works flawlessly and also mysteriously and incomprehensibly in RAWR's Live template; and yet it fails on a clean install of the base hfs.tpl . (And, honestly, I can't really understand it well enough to debug it there, either!)
I'm using HFS to host an Android-based data collection system, so it is all about the devices doing very simple .CSV input file downloads; and then simple uploads of the finished data files. These transfers are all one file at a time; archive .tar files are used only for loading the site with data for the collection tablets, and for fetching back the completed data files.
SO, the back office people will download a selected batch of uploaded data, and then delete these files from the server. So unfortunately, this possibly obscure "Download Archive, then Delete the files" bug is one that we'll step into all the time.
Are there other simple templates that allow selection and deletion that I can check for this bug?
Or, is there someone that can explain the archive and deletion code in either the stock hfs.tpl or in Live-3.0.1.tpl ?
Thanks,
Steve