mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1164822 - Fix OS.File.remove not throwing with unexisting files. r=Yoric
This commit is contained in:
parent
b0162ea257
commit
505181a2f7
@ -1012,10 +1012,15 @@ File.removeEmptyDir = function removeEmptyDir(path, options) {
|
||||
* Remove an existing file.
|
||||
*
|
||||
* @param {string} path The name of the file.
|
||||
* @param {*=} options Additional options.
|
||||
* - {bool} ignoreAbsent If |false|, throw an error if the file does
|
||||
* not exist. |true| by default.
|
||||
*
|
||||
* @throws {OS.File.Error} In case of I/O error.
|
||||
*/
|
||||
File.remove = function remove(path) {
|
||||
File.remove = function remove(path, options) {
|
||||
return Scheduler.post("remove",
|
||||
[Type.path.toMsg(path)]);
|
||||
[Type.path.toMsg(path), options], path);
|
||||
};
|
||||
|
||||
|
||||
|
@ -217,8 +217,8 @@ if (this.Components) {
|
||||
removeEmptyDir: function removeEmptyDir(path, options) {
|
||||
return File.removeEmptyDir(Type.path.fromMsg(path), options);
|
||||
},
|
||||
remove: function remove(path) {
|
||||
return File.remove(Type.path.fromMsg(path));
|
||||
remove: function remove(path, options) {
|
||||
return File.remove(Type.path.fromMsg(path), options);
|
||||
},
|
||||
open: function open(path, mode, options) {
|
||||
let filePath = Type.path.fromMsg(path);
|
||||
|
Loading…
Reference in New Issue
Block a user