From 819fa01e2092201cb904da20c4b751850435748e Mon Sep 17 00:00:00 2001 From: Jesus Macias Date: Wed, 3 Sep 2014 12:08:22 +0200 Subject: [PATCH 1/5] Solve bug with touch always return true on /lib/private/files/view.php --- 3rdparty | 2 +- lib/private/files/view.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/3rdparty b/3rdparty index 57245d2a64..554277edd6 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit 57245d2a64c99aab8a438f909988e7a4ffef5b23 +Subproject commit 554277edd6155ca3f5b21e32fe16b818d7fb827e diff --git a/lib/private/files/view.php b/lib/private/files/view.php index d310a0fa4e..1af2f77560 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -304,7 +304,13 @@ class View { $hooks[] = 'write'; } $result = $this->basicOperation('touch', $path, $hooks, $mtime); - if (!$result) { //if native touch fails, we emulate it by changing the mtime in the cache + if (!$result) { + // If create file fails because of permissions on external extorage like sharepoint, + // check file exists and return false if not. + if(!$this->file_exists($path)){ + return false; + } + //if native touch fails, we emulate it by changing the mtime in the cache $this->putFileInfo($path, array('mtime' => $mtime)); } return true; From 516ec661c05f5f73ab921f25ac4cb58ecab1c3a2 Mon Sep 17 00:00:00 2001 From: Jesus Macias Date: Wed, 3 Sep 2014 18:12:36 +0200 Subject: [PATCH 2/5] Fix code with previous comments --- lib/private/files/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 1af2f77560..f97f846bb5 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -305,7 +305,7 @@ class View { } $result = $this->basicOperation('touch', $path, $hooks, $mtime); if (!$result) { - // If create file fails because of permissions on external extorage like sharepoint, + // If create file fails because of permissions on external storage like SMB folders, // check file exists and return false if not. if(!$this->file_exists($path)){ return false; From 883649b69cb3a1cbfa2b56e090bddc07e4cfff7d Mon Sep 17 00:00:00 2001 From: Jesus Macias Date: Wed, 3 Sep 2014 18:20:09 +0200 Subject: [PATCH 3/5] Reset changes on 3rdparty submodule --- lib/private/files/view.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/private/files/view.php b/lib/private/files/view.php index d310a0fa4e..1af2f77560 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -304,7 +304,13 @@ class View { $hooks[] = 'write'; } $result = $this->basicOperation('touch', $path, $hooks, $mtime); - if (!$result) { //if native touch fails, we emulate it by changing the mtime in the cache + if (!$result) { + // If create file fails because of permissions on external extorage like sharepoint, + // check file exists and return false if not. + if(!$this->file_exists($path)){ + return false; + } + //if native touch fails, we emulate it by changing the mtime in the cache $this->putFileInfo($path, array('mtime' => $mtime)); } return true; From bc3378bd5595a4ed93c6d77991345eb1fbf572dd Mon Sep 17 00:00:00 2001 From: Jesus Macias Date: Wed, 3 Sep 2014 12:08:22 +0200 Subject: [PATCH 4/5] Solve bug with touch always return true on /lib/private/files/view.php --- 3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty b/3rdparty index 82d02dd48a..554277edd6 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit 82d02dd48ad11312bd740c57720dc84b4d66fa8a +Subproject commit 554277edd6155ca3f5b21e32fe16b818d7fb827e From 91c817401311007752a6990122a829e38ee0a3c3 Mon Sep 17 00:00:00 2001 From: Jesus Macias Date: Wed, 3 Sep 2014 18:12:36 +0200 Subject: [PATCH 5/5] Fix code with previous comments --- lib/private/files/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 1af2f77560..f97f846bb5 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -305,7 +305,7 @@ class View { } $result = $this->basicOperation('touch', $path, $hooks, $mtime); if (!$result) { - // If create file fails because of permissions on external extorage like sharepoint, + // If create file fails because of permissions on external storage like SMB folders, // check file exists and return false if not. if(!$this->file_exists($path)){ return false;