[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owncloud
Subject:    Re: [Owncloud] getInternalPath and absolute User Homes
From:       Victor Dubiniuk <victor.dubiniuk () gmail ! com>
Date:       2012-10-18 18:02:43
Message-ID: CA+UHsBv1fb1VokYNEOehO94cpG8f-eNDp5Yo3MkH793KVq1XBw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Arthur,

The only thing looks unclear to me. What is context of the OC_User::getHome
invocation?
It is not legal to call OC_User methods from an application as it's not a
public API function.
I'd suggest to implement internal getHome function for an app and refactor
the app to use this function.

---
Victor

On Tue, Oct 16, 2012 at 9:31 PM, Arthur Schiwon <blizzz@owncloud.com> wrote:

> 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
> _______________________________________________
> Owncloud mailing list
> Owncloud@kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
>

[Attachment #5 (text/html)]

Hi Arthur,<div><br></div><div><div>The only thing looks unclear to me. What is context of the \
OC_User::getHome invocation? </div><div>It is not legal to call OC_User methods from an \
application as it&#39;s not a public API function.</div> <div>I&#39;d suggest to implement \
internal getHome function for an app and refactor the app to use this \
function.</div></div><div><br></div><div>---</div><div>Victor<br><br><div \
class="gmail_quote">On Tue, Oct 16, 2012 at 9:31 PM, Arthur Schiwon <span dir="ltr">&lt;<a \
href="mailto:blizzz@owncloud.com" target="_blank">blizzz@owncloud.com</a>&gt;</span> wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hey,<br> <br>
a while ago, Georg implemented OC_User::getHome($uid) which gives back the<br>
user home folder. It returns an absolute path. I implemented the function for<br>
the LDAP backend as well and, analog to the original method, also return an<br>
absolute value.<br>
<br>
Now I found out that not everywhere OC_User::getHome($uid) is used when the<br>
home folder is established. Recently I adjusted files_version. Today I came<br>
across OC_Cache_File, thus i wanted to adjust this. However, I came across a<br>
problem.<br>
<br>
The User File Cache stores everything in the sub folder &#39;cache&#39; in ther user<br>
directory. Now when<br>
$dh=$storage-&gt;opendir(&#39;/&#39;);<br>
is executed – with $storage being an instance of<br>
Filesystemview(&#39;/path/to/user/home/cache&#39;) – ownCloud tries to read from<br>
/pattodatadir/path/to/user/home/cache which of course won&#39;t work since the<br>
path to the home dir is already an absolute one.<br>
<br>
This path is created in Filesystem::getInternalPath(), because the mountpoint<br>
is determined as (/).<br>
<br>
For now I have no idea how to improve it;  or if it is even possible.<br>
Furthermore it&#39;s a central part and i don&#39;t want to break it :)<br>
So, ideas?<br>
<br>
Cheers<br>
Arthur<br>
_______________________________________________<br>
Owncloud mailing list<br>
<a href="mailto:Owncloud@kde.org">Owncloud@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/owncloud" \
target="_blank">https://mail.kde.org/mailman/listinfo/owncloud</a><br> \
</blockquote></div><br></div>



_______________________________________________
Owncloud mailing list
Owncloud@kde.org
https://mail.kde.org/mailman/listinfo/owncloud


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic