mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
latest copy
This commit is contained in:
parent
91c531be73
commit
43d883559c
@ -46,9 +46,11 @@ class saveFile {
|
|||||||
|
|
||||||
public function saveBackup($file){
|
public function saveBackup($file){
|
||||||
|
|
||||||
if (!is_dir($this->path."backup")) mkdir($this->path."backup", 0700);
|
// if dir doesn't exist, create it
|
||||||
|
if (!is_dir($this->path.DIRECTORY_SEPARATOR."backup")) mkdir($this->path."backup", 0700);
|
||||||
|
|
||||||
$newfile = $this->path."backup".DIRECTORY_SEPARATOR.$file.".d2um";
|
// set new file location to copy to (backup)
|
||||||
|
$newfile = $this->path.DIRECTORY_SEPARATOR."backup".DIRECTORY_SEPARATOR.$file;
|
||||||
|
|
||||||
if (!copy($file, $newfile)) {
|
if (!copy($file, $newfile)) {
|
||||||
echo "Failed to create backup of $file...\n";
|
echo "Failed to create backup of $file...\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user