Closed
Bug 681660
Opened 11 years ago
Closed 11 years ago
[win] GetDiskSpaceAvailable doesn't work on files
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(1 file)
2.44 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
This works: Components.utils.import("resource://gre/modules/Services.jsm"); var profile = Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile); profile.diskSpaceAvailable; This returns 0: Components.utils.import("resource://gre/modules/Services.jsm"); var file = Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile); file.append("places.sqlite"); file.diskSpaceAvailable; It returns 0 because GetDiskFreeSpaceExW returns 0 (thus it fails)
Assignee | ||
Updated•11 years ago
|
Summary: GetDiskSpaceAvailable works only on nsILocalFile representing folders → [win] GetDiskSpaceAvailable works only on nsILocalFile representing folders
Assignee | ||
Comment 1•11 years ago
|
||
and that is not so wrong since the first argument to GetDiskFreeSpaceExW is lpDirectoryName... it must be a directory, probably if the nsILocalFile is a file we should rather query its parent directory
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #555580 -
Flags: review?(jmathies)
Assignee | ||
Updated•11 years ago
|
Summary: [win] GetDiskSpaceAvailable works only on nsILocalFile representing folders → [win] GetDiskSpaceAvailable doesn't work on files
![]() |
||
Updated•11 years ago
|
Attachment #555580 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 4•11 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/7dab2bc1cc91
Whiteboard: [inbound]
Comment 5•11 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/7dab2bc1cc91
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
Assignee | ||
Updated•7 years ago
|
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•