0 users online. Create an account or sign in to join them.Users
A for , submitted by michael-e on 04 April 2010
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
While overwriting files by files with the same name has been solved, still a simple “remove file, then save” action does not remove the file. (Tested in 2.0.7 and 2.0.8 RC1) This also means that replacing the file won’t work if you save in between.
Is this an intended behavior? (See issue #82.) I think that the file should be deleted from the server if “remove file” has been clicked.
Is it a bug? I find the following in the logs:
2010/04/03 19:35:37 > WARNING: 2 - unlink(/www/htdocs/v301321/www.example.com/workspace/uploads/) [<a href='function.unlink'>function.unlink</a>]: Is a directory in file /www/htdocs/v301321/www.example.com/symphony/lib/toolkit/class.general.php on line 657
@micheal-e - I’m guessing here, but /www/htdocs/v301321/www.example.com/workspace/uploads/ still has files in it, correct?
unlink() won’t work on a directory with files inside it - Symphony should probably throw an error here, or recursively delete the contents of the directory.
It shouldn’t be trying to delete a directory.
These lines of the upload field:
406: $existing_file = rtrim($rel_path, '/') . '/' . trim(basename($row['file']), '/');
409: General::deleteFile(WORKSPACE . $existing_file);
I’m guessing $row['file'] is empty. $existing_file ends up as workspace/uploads, and General::deleteFile() is blindly called.
I am not actively trying to delete a directory. As I said in my initial post, this happens when I try to delete a file (i.e. click on “remove file” and then save the entry). The file is not removed from the upload location, and the error in the log is just a by-product of this attempt.
http://github.com/symphony/symphony-2/commit/bedaff4bdfb6426d3ab47d88c4d6134fafabb343 Should now work as intended.
This issue is closed.
Contact the team
Symphony • Open Source XSLT CMS