Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

afterDelete #109

Closed
pontius34 opened this issue May 11, 2015 · 1 comment
Closed

afterDelete #109

pontius34 opened this issue May 11, 2015 · 1 comment
Assignees
Labels

Comments

@pontius34
Copy link

If you have 2 folders that where created in one model then the folders dont get deleted. only one folder get deleted. f.e. you have databasefields avatar_1 and avatar_2.
This is because of the "if (!$path) {" in afterDelete in the behavior.
If it tries to delete the second folder then the path is the path from the folder before.
So if you delete the condition, the path gets new every time and both folders are deleted.
Please take a look. i have deleted the condition and it works. This has to be fixed i think. Do we need the condition? I dont think so. Below is the code without condition.

http://pastebin.com/eJU55xi3

@davidyell
Copy link
Owner

Ah yes, a similar issue was reported before, where the path class was being used in a loop and not being reset for each iteration.

It seems this is a related bug where the path instance needs to be unset at the end of each iteration.

I can take care of this.

@davidyell davidyell self-assigned this May 20, 2015
@davidyell davidyell added the bug label May 20, 2015
davidyell pushed a commit that referenced this issue Jun 3, 2015
davidyell added a commit that referenced this issue Jun 3, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants