Skip to content

Commit

Permalink
Merge pull request #199 from Niolak/fix/permissions-snapshot-files
Browse files Browse the repository at this point in the history
chmod snapshot folders and files
  • Loading branch information
freekmurze committed May 3, 2024
2 parents 4cae636 + a38183c commit 61e2eb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ public function put(string $filename, string $contents): void
{
if (! file_exists($this->basePath)) {
mkdir($this->basePath, 0777, true);
chmod($this->basePath, 0777);
}

file_put_contents($this->path($filename), $contents);
chmod($this->path($filename), 0666);
}

public function delete(string $fileName): bool
Expand All @@ -73,9 +75,11 @@ public function copy(string $filePath, string $fileName): void
{
if (! file_exists($this->basePath)) {
mkdir($this->basePath, 0777, true);
chmod($this->basePath, 0777);
}

copy($filePath, $this->path($fileName));
chmod($this->path($fileName), 0666);
}

public function fileEquals(string $filePath, string $fileName): bool
Expand Down

0 comments on commit 61e2eb5

Please sign in to comment.