Skip to content

Commit 4874713

Browse files
committed
Windows: Only create plugins folder if it does not exist
Signed-off-by: Olli Janatuinen <[email protected]>
1 parent c9a8a2d commit 4874713

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sdk/spec_file_generator.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ func createPluginSpecDirWindows(name, address, daemonRoot string) (string, error
3232

3333
pluginSpecDir := PluginSpecDir(daemonRoot)
3434

35-
if err := windowsCreateDirectoryWithACL(pluginSpecDir); err != nil {
36-
return "", err
35+
if _, err := os.Stat(pluginSpecDir); os.IsNotExist(err) {
36+
if err := windowsCreateDirectoryWithACL(pluginSpecDir); err != nil {
37+
return "", err
38+
}
3739
}
3840
return pluginSpecDir, nil
3941
}

0 commit comments

Comments
 (0)