Closed Bug 443259 Opened 16 years ago Closed 16 years ago

file upload leaves file locked until FF closed.

Categories

(Firefox :: General, defect)

x86
OS/2
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 183689

People

(Reporter: dave, Unassigned)

Details

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.1.14) Gecko/20080418 Firefox/2.0.0.14
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.1.14) Gecko/20080418 Firefox/2.0.0.14

Sorry if this is the wrong classification but as you see it could be under several headings.

I was trying to run some pages generated by CGI through the W3C validator. Now this is a secured site so I can't point the validator at them and so was using the "upload file" method. So of course one first has to get a file *to* upload.
 
The first, most obvious thing to try was "save page as" this gave a 
file that W3C refused to look at because FF strips the <?xml 
version="1.0" encoding="iso-8859-1"?> line from the source when it 
saves the page.
 
I then tried "View page source". Better, in that the <?xml line was 
still present. I then saved using the source viewer's "save as". The 
validateor was now happy. Well apart from my errors of course. :-) I 
then corrected the CGI routine and ran through the sequence again. The
validator showed the *same* errors. After much faffing about I 
realised that it appeared to be resaving the original file, or that is 
what it looked like. The "view page source" pane showed the latest 
code, and saving would up the timestamp on the file, but its contents 
would be the original. :-(
 
I then messed around with edit/select all edit/copy and pasted to 
another file and tried to save that. This is where I find that FF 
*never* releases the files it has selected for upload. Even closing the tab does not release the lock. So I was forced to keep changing the file name. I am guessing that the lock was stopping "view page 
source" from saving the later content. But there are no warnings and 
it appears to work. OTOH I can't think *how* it manages to change the 
timestamp on the file when it is locked.


Reproducible: Always

Steps to Reproduce:
1. Upload a file to http://validator.w3.org/
2. Use a utility that shows file locks such as fuser - The file uploaded will show something similar to:  File is: Read_Write
File handle: inherited from DosExecPgm. Share: Opened for: read only.

3. Close the W3C tab
4: The lock is still there. It won't be released until FF is closed.
Actual Results:  
All files uploaded stayed locked until FF ends. 

Expected Results:  
Lock should be released after upload completes.

Even if the problem is just the file uploader there is still something wrong with  the "save as" function of "view page source" because it is obviously *not* checking that it cannot write to a locked file.
Component: View Source → General
QA Contact: view.source → general
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Which the search I did previously as requested did not turn up :-(

However, please note comments re "view page source"/"Save as" Not reporting that it could not save the file.
I had this 2 options: mark it as dupe of that bug (the summary of this bug matches) or mark it invalid because of 2 issues per bug report because that is not allowed.
You need to log in before you can comment on or make changes to this bug.