[Owncloud] getInternalPath and absolute User Homes

Arthur Schiwon blizzz at owncloud.com
Tue Oct 16 18:31:56 UTC 2012


Hey,

a while ago, Georg implemented OC_User::getHome($uid) which gives back the 
user home folder. It returns an absolute path. I implemented the function for 
the LDAP backend as well and, analog to the original method, also return an 
absolute value.

Now I found out that not everywhere OC_User::getHome($uid) is used when the 
home folder is established. Recently I adjusted files_version. Today I came 
across OC_Cache_File, thus i wanted to adjust this. However, I came across a 
problem.

The User File Cache stores everything in the sub folder 'cache' in ther user 
directory. Now when 
$dh=$storage->opendir('/'); 
is executed – with $storage being an instance of 
Filesystemview('/path/to/user/home/cache') – ownCloud tries to read from
/pattodatadir/path/to/user/home/cache which of course won't work since the 
path to the home dir is already an absolute one.

This path is created in Filesystem::getInternalPath(), because the mountpoint 
is determined as (/). 

For now I have no idea how to improve it;  or if it is even possible. 
Furthermore it's a central part and i don't want to break it :)
So, ideas?

Cheers
Arthur



More information about the Owncloud mailing list