replaced for in loops with normal enumerating loops to fix #1803
Merge pull request #1809 from owncloud/fix_ie_deletefolder

replaced for in loops with normal enumerating loops to fix #1803