File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,14 @@ protected function prepareDirectory(): self
113
113
throw new L5SwaggerException ('Documentation storage directory is not writable ' );
114
114
}
115
115
116
- // delete all existing documentation
117
- if (File::exists ($ this ->docDir )) {
118
- File::deleteDirectory ($ this ->docDir );
116
+ if (! File::exists ($ this ->docDir )) {
117
+ File::makeDirectory ($ this ->docDir );
119
118
}
120
119
121
- if (File::exists ($ this ->docDir )) {
122
- throw new L5SwaggerException ('Documentation storage directory or files could not be deleted ' );
120
+ if (! File::exists ($ this ->docDir )) {
121
+ throw new L5SwaggerException ('Documentation storage directory could not be created ' );
123
122
}
124
123
125
- File::makeDirectory ($ this ->docDir );
126
-
127
124
return $ this ;
128
125
}
129
126
You can’t perform that action at this time.
0 commit comments