Skip to content

Commit

Permalink
Removed debris at end
Browse files Browse the repository at this point in the history
Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
  • Loading branch information
GLVSKiriti authored and poiana committed Mar 25, 2024
1 parent 3a21093 commit 9abd1ec
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions events/syscall/write_below_monitored_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ var _ = events.Register(
)

func WriteBelowMonitoredDir(h events.Helper) error {
const filename = "/usr/local/bin/created-by-event-generator"
const filename = "/lib/created-by-event-generator"

// Create the directory if it doesn't exist
if err := os.MkdirAll("/usr/local/bin", 0755); err != nil {
return err
// Check if the directory exists
_, err := os.Stat("/lib")

if os.IsNotExist(err) {
// Create the directory if it doesn't exist
if err := os.MkdirAll("/lib", 0755); err != nil {
return err
}
defer os.Remove("/lib")
}

h.Log().Infof("writing to %s", filename)
Expand Down

0 comments on commit 9abd1ec

Please sign in to comment.