Skip to content

Issue 68, Not found .json (settings) at first run for Tar backup. #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Backup/Destination/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public function canAccess();
*/
public function listContents($dir = '', $recursive = false);

/**
* @param string $file The path to the file.
* @return string|false The file contents or false on failure.
*/
public function read($file);

public function write($filename, $contents);
}
}
8 changes: 6 additions & 2 deletions src/Backup/Destination/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public function canAccess()

public function read($file)
{
return $this->filesystem->read($file);
try {
return $this->filesystem->read($file);
} catch (\League\Flysystem\FileNotFoundException $e) {
return false;
}
}

public function listContents($dir = '', $recursive = false)
Expand All @@ -65,4 +69,4 @@ public function write($filename, $contents)
}
return $this->filesystem->put($filename, $contents);
}
}
}
2 changes: 1 addition & 1 deletion src/Backup/Tools/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,4 +341,4 @@ public function getOutput()
{
return $this->_output;
}
}
}