Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

filesize(): stat failed /apps/fbsync/controller/facebookcontroller.php#329 #21

Closed
ggeorgg opened this issue Mar 8, 2016 · 4 comments
Closed
Assignees
Milestone

Comments

@ggeorgg
Copy link

ggeorgg commented Mar 8, 2016

filesize(): stat failed for /www/htdocs/xxxxx/domain.de/owncloud/data/user/fbsync.cookie at /www/htdocs/xxxxx/domain.de/owncloud/apps/fbsync/controller/facebookcontroller.php#329

Maybe this it would be better to check if the file does not exist:
if(!file_exists($this->userHome.$this->cookieName)) {

Otherwise I always get this error in my oc log when opening the fb app in owncloud when I am not logged in to facebook.
Or is there a reason to check for the filesize?

@skjnldsv
Copy link
Owner

skjnldsv commented Mar 8, 2016

Hi!
There was a reason. If the cookie exist but is empty, then the user can't be connected.
This avoid us to make a http request to see if the facebook user is connected.

(don't know if i'm very understandable :p)

@ggeorgg
Copy link
Author

ggeorgg commented Mar 8, 2016

Is there a possibility that this file exists and it is empty?
If I use the button to remove the stored credentials the file is deleted. And if this file does't exist, there will always be this filesize-error when trying to read the filesize of an non-exisiting file.
So either the file is there and it was created by clicking the login button and it is not empty or it is not there because the app has just been activated or the owncloud user has deleted the user credentials previously).
So in my opinion !file_exists(...) makes more sense here than filesize(...).
Hope you understand what I mean ;)

@skjnldsv
Copy link
Owner

skjnldsv commented Mar 9, 2016

I understand perfectly! :)
There was a reason in the first releases, but I can't remember which ones! :p
i will see that for the next one.

@skjnldsv skjnldsv self-assigned this Mar 9, 2016
@skjnldsv skjnldsv added this to the 1.8 milestone Mar 12, 2016
@skjnldsv
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants