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

github.com/nextcloud/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2019-03-09 13:17:23 +0300
committerPhie <phie@phie.ovh>2019-03-09 13:17:23 +0300
commit9f64ec9b0fde5101eaf4c5347c3d7fe30a505d87 (patch)
tree2757e982854b20db59b5fa3391374a24d39f6adf
parent8fed1e57a70d615c72f2fbdf5ee25b3221523930 (diff)
emergency updatev0.13.4v0.13.3
-rwxr-xr-xappinfo/info.xml2
-rw-r--r--lib/Hooks/FSHooks.php33
2 files changed, 19 insertions, 16 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 6850b6b..0d7c7e5 100755
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -18,7 +18,7 @@ Mac, with sync capabilities
- Statistics : words/sentences/characters
- Sync with NextCloud
- Online editor as a NextCloud App]]></description>
- <version>0.13.2</version>
+ <version>0.13.4</version>
<licence>agpl</licence>
<author mail="phie@phie.ovh" >Phie</author>
<namespace>Carnet</namespace>
diff --git a/lib/Hooks/FSHooks.php b/lib/Hooks/FSHooks.php
index 51c036b..344bbd1 100644
--- a/lib/Hooks/FSHooks.php
+++ b/lib/Hooks/FSHooks.php
@@ -27,22 +27,25 @@ 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
-
- if(substr($node->getPath(), 0, strlen($this->carnetFolder->getPath())) === $this->carnetFolder->getPath()){
- $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);
- $cacheManager->addToCache($relativePath, $metadata, $metadata['lastmodfile']);
+ try{
+ 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
+
+ if(substr($node->getPath(), 0, strlen($this->carnetFolder->getPath())) === $this->carnetFolder->getPath()){
+ $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);
+ $cacheManager->addToCache($relativePath, $metadata, $metadata['lastmodfile']);
+ }
}
+ } catch(\PhpZip\Exception\ZipException $e){
+
}