Closed Bug 760643 Opened 12 years ago Closed 12 years ago

Device Storage - Delete isn't working

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: dougt, Assigned: dougt)

Details

Attachments

(1 file)

Currently Delete() is silently failing.  I am going to change the code to test for existence after delete and fire an onError if the file continues to exists.

We are also incorrectly calculating the path of storage.  I am going to clean up our DeviceStorageFile to always clone() the nsIFile to avoid such problems.
Attached patch patch v.1Splinter Review
Attachment #629317 - Flags: review?(jonas)
Comment on attachment 629317 [details] [diff] [review]
patch v.1

Review of attachment 629317 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +43,5 @@
> +    nsCOMPtr<nsIFile> file;
> +    aFile->Clone(getter_AddRefs(mFile));
> +  }
> +  nsCOMPtr<nsIFile> mFile;
> +  nsString mPath;

Put these first or last. Keeping them in the middle makes them hard to find.
Attachment #629317 - Flags: review?(jonas) → review+
last patch broke windows.  fixed up the path, pushed to try, and its good now.  results should be coming soon.
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/efa54ecee724
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: