diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-19 02:42:18 -0700 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-19 02:42:18 -0700 |
commit | 904227a0e4b95be4f1a0aa87b9173fd2fea966c8 (patch) | |
tree | 632dcffaed9039b38e6a8c1093eea99b64ccde3a /lib/files/view.php | |
parent | dd231b530d6cbf168c85bb83b2a268b1d70b8ce8 (diff) | |
parent | 87521f6c6e19bb2cff21ad0792604d24a6d6403e (diff) | |
download | nextcloud-server-904227a0e4b95be4f1a0aa87b9173fd2fea966c8.tar.gz nextcloud-server-904227a0e4b95be4f1a0aa87b9173fd2fea966c8.zip |
Merge pull request #3661 from owncloud/fixing-windows-server-master
Fixing windows server master
Diffstat (limited to 'lib/files/view.php')
-rw-r--r-- | lib/files/view.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index e2fc8d965b8..25071709fbe 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -386,6 +386,12 @@ class View { $source = $this->fopen($path1 . $postFix1, 'r'); $target = $this->fopen($path2 . $postFix2, 'w'); list($count, $result) = \OC_Helper::streamCopy($source, $target); + + // close open handle - especially $source is necessary because unlink below will + // throw an exception on windows because the file is locked + fclose($source); + fclose($target); + if ($result !== false) { list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1); $storage1->unlink($internalPath1); |