Closed Bug 912385 Opened 6 years ago Closed 6 years ago

Include the trailing slash in File.path

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

As agreed with Jonas on IRC (as noted in bug 907428 comment 10) we should include a trailing slash on File.path in order to make it easier to use.

In other words, instead of having to do:

  var fullpath = (file.path ? file.path + "/" : "") + file.name;

users can just do:

  var fullpath = file.path + file.name;

and that will do the right thing regardless of whether file.path is the empty string or not.
Attached patch patchSplinter Review
I'll check this in and let you do a retrospective r+ once you're back.
Attachment #799365 - Flags: review?(jonas)
https://hg.mozilla.org/mozilla-central/rev/1a046ece14db
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.