Recursion when copying album

I managed to create thousands of subfolders by copying an album.
The albums were as following:
myalbum/subalbum
I did:
copy myalbum -> subalbum
It created -> myalbum/subalbum/myalbum/subalbum/myalbum...
This created a PHP timeout of over 60 seconds (it was a catalog with only about 30 images) and the process seemed to kept on going even after PHP had stopped - I couldn't delete the subalbum with all it's contents, as the system said that the catalog is in use or something similar (runs on UNIX machine). I got it removed only by e-mailing the hosting provider.

So I think it would be necessary to check that the folder we are copying to isn't a subfolder of the folder we are making a copy of. Probably the same goes for moving an album.

Comments

  • acrylian Administrator, Developer
    Actually it is not possible to copy an album to itself. Are you sure you are running the latest release?
  • Ah yes, not the current release - 1.2.5, sorry if this is fixed in the newest release.

    I did not copy the folder into itselt, but into a folder that is a subfolder of the copied folder.
  • acrylian Administrator, Developer
    Well, we don't release new version for no reason...;-)
Sign In or Register to comment.