Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification in setFileRoot #258

Closed
sandeepbisht opened this issue Jun 8, 2014 · 6 comments
Closed

Modification in setFileRoot #258

sandeepbisht opened this issue Jun 8, 2014 · 6 comments

Comments

@sandeepbisht
Copy link

Problem

Note:May be this is an issue or i am integrating it wrong.

Images folder location in server is /var/www/html/public/images

I am using it as
$fm->setFileRoot("/public/images");

I created a folder using filemanager it successfully created.In attempt of deleting the folder I am getting "Invalid directory of file' error

When i enable the log of getFullPath.Then logs prints as

returned path : /var/www/html/public/images/public/images/My_folder/

It should be /var/www/html/public/images/My_folder/

Solution

I done following change in code and it worked

Changes are in setFileRoot function(filemanager.class.php) when setting dynamic_fileRoot

$this->dynamic_fileroot = str_replace("//","/",str_replace($_SERVER['DOCUMENT_ROOT'], '', $this->doc_root));

@simogeo
Copy link
Owner

simogeo commented Jun 11, 2014

Thanks for reporting. I'll have a look on this later

@simogeo
Copy link
Owner

simogeo commented Jun 19, 2014

Hi,

I've made a new test and have no problem.

The $this->getFullPath() called from delete() method is supposed to format correctly the path. See it here.

Are you sure you proceed as described into the wiki page ?

@simogeo
Copy link
Owner

simogeo commented Jun 23, 2014

Any other feedback is welcome

@simogeo simogeo closed this as completed Nov 20, 2014
@vrakita
Copy link

vrakita commented Oct 13, 2015

I had issue with this plugin after adding dynamic root in user.config.php for matching userID with directory. I was getting No Way when I try to delete file, everything else was working properly.

@sandeepbisht with your solution now I am able to delete files.

Thank you.

@simogeo
Copy link
Owner

simogeo commented Oct 13, 2015

I don't have much time so I integrated the proposed fix without taking much time to analyse. If someone could explain it would be nice. Thanks

@vrakita
Copy link

vrakita commented Oct 14, 2015

@simogeo Thank you, and thank you for this great plugin.

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

No branches or pull requests

3 participants