Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Missing recycle bin management in smb driver (see #520)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 31, 2014
1 parent ddcfea9 commit 914bc64
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/src/plugins/access.smb/class.smbAccessDriver.php
Expand Up @@ -57,6 +57,17 @@ public function initRepository()
$wrapperData = $this->detectStreamWrapper(true);
$this->wrapperClassName = $wrapperData["classname"];
$this->urlBase = $wrapperData["protocol"]."://".$this->repository->getId();

if ($recycle!= "" && !is_dir($this->urlBase."/".$recycle)) {
@mkdir($this->urlBase."/".$recycle);
if (!is_dir($this->urlBase."/".$recycle)) {
throw new AJXP_Exception("Cannot create recycle bin folder. Please check repository configuration or that your folder is writeable!");
}
}
if ($recycle != "") {
RecycleBinManager::init($this->urlBase, "/".$recycle);
}

}

public function detectStreamWrapper($register = false)
Expand Down

0 comments on commit 914bc64

Please sign in to comment.