Bug 1223825 - Change Directory.path to include the directory's name. r=baku

This commit is contained in:
Jonathan Watt 2015-10-12 16:18:20 +01:00
parent 4de5282ba6
commit 24d548593f
2 changed files with 6 additions and 3 deletions

View File

@ -230,8 +230,7 @@ Directory::GetPath(nsAString& aRetval) const
// The Directory ctor removes any trailing '/'; this is the root directory.
aRetval.AssignLiteral(FILESYSTEM_DOM_PATH_SEPARATOR);
} else {
aRetval = Substring(mPath, 0,
mPath.RFindChar(FileSystemUtils::kSeparatorChar) + 1);
aRetval = mPath;
}
}

View File

@ -99,7 +99,11 @@ partial interface Directory {
//readonly attribute DOMString name;
/*
* The base name of the directory (a relative path excluding the leaf name).
* The path of the Directory (includes both its basename and leafname).
* The path begins with the name of the ancestor Directory that was
* originally exposed to content (say via a directory picker) and traversed
* to obtain this Directory. Full filesystem paths are not exposed to
* unprivilaged content.
*/
readonly attribute DOMString path;