Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents beb4dcd + 7225591 commit d8514b7Copy full SHA for d8514b7
backend/protobuf/write_files.go
@@ -22,7 +22,7 @@ func WriteSparkplugProtoFiles(resourcePath string) error {
22
// Check if the directory exists
23
if _, err := os.Stat(protoDirPath); os.IsNotExist(err) {
24
// Create the directory if it doesn't exist
25
- if err := os.MkdirAll(protoDirPath, 0644); err != nil {
+ if err := os.MkdirAll(protoDirPath, os.ModePerm); err != nil {
26
return err
27
}
28
@@ -50,7 +50,7 @@ func writeFile(path string, bytes []byte) error {
50
51
52
// Write the embedded file to the specified path
53
- if err := os.WriteFile(path, bytes, 0644); err != nil {
+ if err := os.WriteFile(path, bytes, os.ModePerm); err != nil {
54
55
56
return nil
0 commit comments