File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1777,7 +1777,7 @@ impl DirBuilder {
17771777 fn create_dir_all ( & self , path : & Path ) -> io:: Result < ( ) > {
17781778 match self . inner . mkdir ( path) {
17791779 Ok ( ( ) ) => return Ok ( ( ) ) ,
1780- Err ( ref e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists => return Ok ( ( ) ) ,
1780+ Err ( ref e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists && path . is_dir ( ) => return Ok ( ( ) ) ,
17811781 Err ( ref e) if e. kind ( ) == io:: ErrorKind :: NotFound => { }
17821782 Err ( e) => return Err ( e) ,
17831783 }
@@ -1787,7 +1787,7 @@ impl DirBuilder {
17871787 }
17881788 match self . inner . mkdir ( path) {
17891789 Ok ( ( ) ) => Ok ( ( ) ) ,
1790- Err ( ref e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists => Ok ( ( ) ) ,
1790+ Err ( ref e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists && path . is_dir ( ) => Ok ( ( ) ) ,
17911791 Err ( e) => Err ( e) ,
17921792 }
17931793 }
You can’t perform that action at this time.
0 commit comments