# R36376 - /branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php

**URL:** <https://help.egroupware.org/t/r36376-branches-1-8-phpgwapi-inc-class-egw-vfs-inc-php/49144>\
**Category:** eGW-svn\
**Created:** [August 30, 2011, 5:04pm UTC](https://help.egroupware.org/t/r36376-branches-1-8-phpgwapi-inc-class-egw-vfs-inc-php/49144 "2011-08-30T17:04:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralfbecker\_sf](https://help.egroupware.org/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@ralfbecker\_sf](https://help.egroupware.org/u/ralfbecker_sf)\
**Post date:** [August 30, 2011, 5:04pm UTC](https://help.egroupware.org/t/r36376-branches-1-8-phpgwapi-inc-class-egw-vfs-inc-php/49144/1 "2011-08-30T17:04:37Z")

</div>

Author: ralfbecker  
New Revision: 36376

URL: [http://svn.stylite.de/viewvc/egroupware?rev=36376&view=rev](http://svn.stylite.de/viewvc/egroupware?rev=36376&view=rev)  
Log:

- WebDAV: allow locking of not (yet) existing files to create them

- failed before as there are no write-rights for not existing files
- now we check for not existing files the write rights of the parent directory

Modified:  
branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php

# Modified: branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php URL: [http://svn.stylite.de/viewvc/egroupware/branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php?rev=36376&r1=36375&r2=36376&view=diff](http://svn.stylite.de/viewvc/egroupware/branches/1.8/phpgwapi/inc/class.egw_vfs.inc.php?rev=36376&r1=36375&r2=36376&view=diff)

— branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php (original)  
+++ branches/1.8/phpgwapi/inc/class.egw\_vfs.inc.php Tue Aug 30 19:04:37 2011  
@@ -1201,7 +1201,8 @@  
static function lock($path,&$token,&$timeout,&$owner,&$scope,&$type,$update=false,$check\_writable=true)  
{  
// we require write rights to lock/unlock a resource

- 

```
  if (!$path || $update && !$token || $check_writable && !egw_vfs::is_writable($path))

```

- 

```
  if (!$path || $update && !$token || $check_writable &&

```

- 

```
  	!(egw_vfs::is_writable($path) || !egw_vfs::file_exists($path) && egw_vfs::is_writable(egw_vfs::dirname($path))))
  {
  	return false;
  }

```

* * *

Special Offer – Download ArcSight Logger for FREE!  
Finally, a world-class log management solution at an even better  
price-free! And you’ll get a free “Love Thy Logs” t-shirt when you  
download Logger. Secure your free ArcSight Logger TODAY!  
[http://p.sf.net/sfu/arcsisghtdev2dev](http://p.sf.net/sfu/arcsisghtdev2dev)

* * *

eGroupWare-cvs mailing list  
[eGroupWare-cvs@lists.sourceforge.net](mailto:eGroupWare-cvs@lists.sourceforge.net)  
[https://lists.sourceforge.net/lists/listinfo/egroupware-cvs](https://lists.sourceforge.net/lists/listinfo/egroupware-cvs)
