Open Bug 194683 Opened 22 years ago Updated 3 years ago

When saving to replace an existing complete webpage, old data are not discarded.

Categories

(Firefox :: File Handling, defect)

defect

Tracking

()

People

(Reporter: ueli, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126 Overwriting a complete webpage (i.e. htm file with directory tree for components) will only add new files, overwriting files when names are the same. Otherwise, obsolete files in the component directory tree are not removed, although they have lost their relevance. Reproducible: Always Steps to Reproduce: 1.Save a page using Ctrl+S (save complete webpage) and call it xyz.htm . You get a file xyz.htm and a directory subtree called xyz_files with components of the page. 2.Go to a different page, save again using Ctrl+S and call it also xyz.htm 3.Confirm the overwrite warning 4.Inspect contents of xyz_files Actual Results: All files of the first xyz page are still in the xyz_files directory tree. Expected Results: Delete all files in the xyz_files directory tree before storing new files. Workaround: Manually delete files before overwrite operation.
seeing this too & can't find dupe. Confirming on Win XP SP 1, Moz 2003022308
Status: UNCONFIRMED → NEW
Ever confirmed: true
-> file handling
Assignee: dougt → law
Component: Networking: File → File Handling
QA Contact: benc → petersen
Adam, should clients handle this, or should the persistence object? (I'd think the latter, since clients don't even know about the foo_data setup....)
I think so. How is Mozilla supposed to know that those files in random directory foo are actually files from an older save *and* safe for deleting. I can just imagine the fun this would cause if we just went ahead and deleted them. Possibly the persist object could dump out a manifest that could be read for further cleanup but I think for the effort involved, it would just be better for the user to clean up first if that's what they want. Bug 129332 deals with another cleanup issue.
Er... my question was actually whether the file handling code should try to handle this or whether the persistence object should.... for example, the persistance object could prompt for confirmation if the directory already exists....
If you want to prompt about overwriting / deleting the folder, then that is fine and could be done before calling the persist object. However I think it would be extremely dangerous to just arbitrarily delete whatever is in that folder already, certainly without asking. So if you have to do it, it definitely seems like a client thing. With that said, I would be wary of even providing that functionality.
Ah, ok. I just checked and the folder selection is indeed handled completely by the client....
OS: Windows 2000 → All
Hardware: PC → All
Assignee: law → nobody
QA Contact: chrispetersen → file-handling
Product: Core → Firefox
Version: Trunk → unspecified
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.