Closed Bug 123711 Opened 23 years ago Closed 23 years ago

"Save page as web page complete" creates xxxxx_files directory even when there are no files to save

Categories

(Core Graveyard :: File Handling, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: bugs)

References

Details

Attachments

(1 file)

If you try to "Save Page As..." -> "Web Page, complete", the save as process
will create a directory to hold images etc, even if there are no images or
additional files to save.

Example.

Saving As Complete for the file just.html

<html>
<body>
This is just html
</body>
</html>

Will create the file just.html, and an empty directory "just_files".

The directory should be created on demand.
Hrm... that should actually be file handling right?

Changing componant
Component: Browser-General → File Handling
Over to adamlock
Assignee: asa → adamlock
-> Ben

The back-end recently became much better at creating directories on demand (bug
120376), but nsProgressDlg.js still creates the main data directory whether one
is needed or not.

http://lxr.mozilla.org/seamonkey/source/embedding/components/ui/progressDlg/nsProgressDlg.js#415
Instead it could leave creation to the persist object, but it could do a little
sanity checking to ensure that if the named file did exist that it was a
directory and not some other kind of file.
Assignee: adamlock → ben
Depends on: 115634
Keywords: nsbeta1
OS: Windows 2000 → All
QA Contact: doronr → sairuh
Hardware: PC → All
Summary: "Save page as..." creates xxxxx_files directory even when there are no files to save → "Save page as web page complete" creates xxxxx_files directory even when there are no files to save
No longer depends on: 115634
Is there a way for Moz to detect there are no child elements to a document
before it starts the whole file creation bit? If it knew there were none, it
could just use the normal save method (HTML only) and avoid all the dataloss
caused by bugs in the "complete" save as (XML declrs, whitespace mangling, etc).

Better yet, if its determinable quickly, check before the save as dialog box
pops, and don't even present HTML only/Complete. Only have one choice, simply:

  Files of type: [ Web Page              ]
Does Moz mangle the URL's in pages when it Saves as complete? If so, it will 
need to to the mangling with or without extra files.

nsbeta1- per ADT triage team
Keywords: nsbeta1nsbeta1-
This got fixed by the code that landed in bug 27609. See in particular bug
27609, comment 59 and bug 27609, comment 66.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
vrfy'd fixed using 2002.03.13 comm bits on linux7.2, win2k and mac 10.1.3.
tested using http://hopey.mcom.com/tests/simple-html.html
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: