Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Hooks/FSHooks.php')
-rw-r--r--lib/Hooks/FSHooks.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Hooks/FSHooks.php b/lib/Hooks/FSHooks.php
index 5fabc0c..45d902d 100644
--- a/lib/Hooks/FSHooks.php
+++ b/lib/Hooks/FSHooks.php
@@ -3,7 +3,7 @@ namespace OCA\Carnet\Hooks;
use OCP\IUserManager;
use OCA\Carnet\Misc\CacheManager;
use OCA\Carnet\Misc\NoteUtils;
-
+use OCA\Carnet\Controller\NoteController;
use OCP\IDBConnection;
class FSHooks {
@@ -27,7 +27,7 @@ class FSHooks {
}
public function postWrite($node) {
-
+
if(substr($node->getName(), -3) === "sqd"){ // to avoid getting carnet's path each time a file is writen
//we check if is in our path
@@ -35,6 +35,9 @@ class FSHooks {
$relativePath = substr($node->getPath(), strlen($this->carnetFolder->getPath()));
if(substr($relativePath, 0, 1) === "/")
$relativePath = substr($relativePath, 1);
+ /*if(NoteController::$lastWrite === $node->getPath()){
+ return; //was already handled in save
+ }*/
$cacheManager = new CacheManager($this->db);
$utils = new NoteUtils();
$metadata = $utils->getMetadata($this->carnetFolder, $relativePath);