mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 10:10:31 +00:00
Bug 883609 - Making OS.File.removeDir work without options;r=froydnj
This commit is contained in:
parent
bf417a9561
commit
b0f695d6be
@ -1026,7 +1026,7 @@
|
||||
*
|
||||
* Note: This function will remove a symlink even if it points a directory.
|
||||
*/
|
||||
File.removeDir = function(path, options) {
|
||||
File.removeDir = function(path, options = {}) {
|
||||
let isSymLink;
|
||||
try {
|
||||
let info = File.stat(path, {unixNoFollowingLinks: true});
|
||||
|
@ -1031,7 +1031,7 @@
|
||||
* @throws {OS.File.Error} In case of I/O error, in particular if |path| is
|
||||
* not a directory.
|
||||
*/
|
||||
File.removeDir = function(path, options) {
|
||||
File.removeDir = function(path, options = {}) {
|
||||
// We can't use File.stat here because it will follow the symlink.
|
||||
let attributes = WinFile.GetFileAttributes(path);
|
||||
if (attributes == Const.INVALID_FILE_ATTRIBUTES) {
|
||||
|
Loading…
Reference in New Issue
Block a user