[Pkg-owncloud-commits] [php-sabredav] 55/163: Explicitly free locks after file operations
David Prévot
taffit at moszumanska.debian.org
Tue May 20 18:54:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag upstream/2.0.0_beta1
in repository php-sabredav.
commit 94edb079ea8a759bd7fb897ab18cf015114abffc
Author: Markus Staab <markus.staab at redaxo.de>
Date: Sun Apr 13 15:17:34 2014 +0200
Explicitly free locks after file operations
Since php 5.3.2 locks are no longer freed on fclose
---
lib/Sabre/DAV/FSExt/Node.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/Sabre/DAV/FSExt/Node.php b/lib/Sabre/DAV/FSExt/Node.php
index e0c368c..805770c 100644
--- a/lib/Sabre/DAV/FSExt/Node.php
+++ b/lib/Sabre/DAV/FSExt/Node.php
@@ -110,6 +110,7 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
}
// We're all good
+ flock($handle,LOCK_UN);
fclose($handle);
// Unserializing and checking if the resource file contains data for this file
@@ -153,6 +154,7 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
rewind($handle);
fwrite($handle,serialize($data));
+ flock($handle,LOCK_UN);
fclose($handle);
}
@@ -208,6 +210,7 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
ftruncate($handle,0);
rewind($handle);
fwrite($handle,serialize($data));
+ flock($handle,LOCK_UN);
fclose($handle);
return true;
@@ -220,4 +223,3 @@ abstract class Node extends DAV\FS\Node implements DAV\IProperties {
}
}
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list