Closed
Bug 206441
Opened 22 years ago
Closed 22 years ago
Show File Location fails, Status bar includes file:// for downloads, getFileForItem should return filepath not URL
Categories
(SeaMonkey :: Download & File Handling, defect)
SeaMonkey
Download & File Handling
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 175881
People
(Reporter: iannbugzilla, Assigned: iannbugzilla)
References
Details
Attachments
(2 files, 4 obsolete files)
1.96 KB,
patch
|
neil
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
1.03 KB,
patch
|
Details | Diff | Splinter Review |
Using BuildID 2003042508 on linux (RH8.0)
Steps to reproduce
1. Download a file (e.g. foo.tar.gz to /tmp)
2. Select entry in download manager
3. Look at status bar
Expected results
1. Status bar shows /tmp/foo.tar.gz
Actual results:
1. Status bar shows file:///tmp/foo.tar.gz
The status bar is set from the selected item's id so we probably need to either
change what the status bar uses or change what is used for the id.
Comment 1•22 years ago
|
||
I've seen this but not for downloads in the current session.
I've also seen something similar in Windows, but only for UNC paths.
When a new download shows up in the manager it doesn't have the file:// it's
only after you exit mozilla and go back in again the file:// is added. It also
breaks the testing of file existance.
Severity: trivial → major
This patch just deals with the status bar display and fixes the file existance
testing resulting from how the file resource is stored in the download manager
RDF file. It doesn't deal with making download manager store the file resource
in a consistent manner - when a new download is created its id isn't a URL
whereas downloads from previous sessions are.
Summary: Status bar includes file:// for downloads → Status bar includes file:// for downloads and getFileForItem should not return URL
Summary: Status bar includes file:// for downloads and getFileForItem should not return URL → Status bar includes file:// for downloads and getFileForItem should return filepath not URL
Also happens on Mac OS X so setting to All/All
From zach's testing looks like it was present in BuildID 20030501xx in the form
of not being able to launch files because getFileForItem was being passed a URL
instead of a filepath.
Still need to look at what is causing the File resource to be changed on mozilla
restart.
OS: Linux → All
Hardware: PC → All
Attachment #124244 -
Flags: review?(neil.parkwaycc.co.uk)
Flags: blocking1.4?
Summary: Status bar includes file:// for downloads and getFileForItem should return filepath not URL → Show File Location fails, Status bar includes file:// for downloads, getFileForItem should return filepath not URL
*** Bug 157647 has been marked as a duplicate of this bug. ***
Comment 8•22 years ago
|
||
Is there no better way to fix this? What does your patch do to UNC Paths, will
they still work? Why not let necko convert the url to a file?
Attachment #124244 -
Flags: review?(neil.parkwaycc.co.uk)
This patch goes back to my first idea for a solution which I originally
couldn't get to work but now does thanks to biesi (I was missing a .path).
Attachment #124244 -
Attachment is obsolete: true
Attachment #124389 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 10•22 years ago
|
||
Comment on attachment 124389 [details] [diff] [review]
Patch v1.1
Hmm... sometimes you want a nsILocalFile and sometimes you want a path. It's
just that converting a file to a path and back to a file somehow seems
wasteful.
Assignee | ||
Comment 11•22 years ago
|
||
Are you refering to the showinshell part of downloadmanager.js?
Attachment #124389 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 12•22 years ago
|
||
Hopefully avoids converting things from one form to another and back again and
no longer introduces a new function. Status bar now makes use of
getFileFromItem too.
Attachment #124389 -
Attachment is obsolete: true
Attachment #124698 -
Flags: review?(neil.parkwaycc.co.uk)
Attachment #124698 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 13•22 years ago
|
||
Moved check from getFileForItem to createLocalFile as suggested by Neil on IRC
Attachment #124698 -
Attachment is obsolete: true
Attachment #124730 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•22 years ago
|
Attachment #124730 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #124730 -
Flags: superreview?(jaggernaut)
Comment 14•22 years ago
|
||
Comment on attachment 124730 [details] [diff] [review]
Patch v1.2b
sr=jag
Seems like we're doing more work here than we should have to do. Oh well.
Attachment #124730 -
Flags: superreview?(jaggernaut) → superreview+
Comment 15•22 years ago
|
||
Which patch is better... This one, or the one in bug 175881?
Assignee | ||
Comment 16•22 years ago
|
||
Both do similar things with createLocalFile just the check for a URL is done
differently and mine's missing some explanatory comments.
Comment 17•22 years ago
|
||
That url check is unnecessary once we fix the download manager to be consistent.
My patch also caches the io service :)
Btw, your patch misses a QI to nsILocalFile which is required on windows and mac
for launch() method be accessible.
Assignee | ||
Comment 18•22 years ago
|
||
Hmmm are you sure win32 needs QI? As I've been testing this patch (or a previous
revision) for 3-4 days and I've been able to launch files without a problem. I
don't have access to mac for testing purposes.
Now caching sounds like a good idea :-)
Comment 19•22 years ago
|
||
It's needed on Mac (I had to add it while I was testing on this platform) and I
guess it's also needed on Windows.
However, your patch should work with new entries in the download manager, but I
haven't tried.
Assignee | ||
Comment 20•22 years ago
|
||
I'm happy to either incorporate your patch into mine using your caching, the
added QI, whichever is the least costly check and the navigator.platform bit or
for you to do similar and include my gStatusBar.label bit
Comment 21•22 years ago
|
||
*** This bug has been marked as a duplicate of 175881 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 22•22 years ago
|
||
Removing blocking request and blocking bug number
No longer blocks: 172785
Flags: blocking1.4?
Assignee | ||
Comment 23•22 years ago
|
||
This patches downloadmanager.js so that it only passes URLs to
|getFileFromURLSpec|
Comment 24•22 years ago
|
||
Comment on attachment 125179 [details] [diff] [review]
Patch to help Jungshik Shin
>- var file;
Don't remove this. Only one declaration per function, please.
Assignee | ||
Comment 25•22 years ago
|
||
Using only one |var file;|
Attachment #125179 -
Attachment is obsolete: true
Comment 26•22 years ago
|
||
Just FYI, my patch refered to is attachment 125219 [details] [diff] [review] to bug 162361.
'downloadmanager.js' part in the patch is virtually identical to attachment
125260 [details] [diff] [review] as Ian wrote.
Anyway, shouldn't we land this patch? It seems like a waste to invoke
getFileFromURLSpec only to find that it fails (quite annoying in a debug build
on Windows because NS_ERROR(...)).
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•