File tree Expand file tree Collapse file tree
package/AgentWindowsManaged/Actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,25 +162,15 @@ public static ActionResult CreateProgramDataPedmDirectories(Session session)
162162 {
163163 string rootPath = Path . Combine ( ProgramDataDirectory , "pedm" ) ;
164164
165- foreach ( string directory in new [ ]
166- {
167- "logs" ,
168- Path . Combine ( "policy" , "profiles" ) ,
169- Path . Combine ( "policy" , "rules" )
170- } )
165+ try
171166 {
172- string path = Path . Combine ( rootPath , directory ) ;
173-
174- try
175- {
176- DirectoryInfo di = Directory . CreateDirectory ( path ) ;
177- session . Log ( $ "created directory at { di . FullName } or already exists") ;
178- }
179- catch ( Exception e )
180- {
181- session . Log ( $ "failed to evaluate or create path { path } : { e } ") ;
182- return ActionResult . Failure ;
183- }
167+ DirectoryInfo di = Directory . CreateDirectory ( rootPath ) ;
168+ session . Log ( $ "created directory at { di . FullName } or already exists") ;
169+ }
170+ catch ( Exception e )
171+ {
172+ session . Log ( $ "failed to evaluate or create path { rootPath } : { e } ") ;
173+ return ActionResult . Failure ;
184174 }
185175
186176 return ActionResult . Success ;
You can’t perform that action at this time.
0 commit comments