mrlapinot
01-18-2008, 11:15 PM
Hi,
the bug I mentionned here :
http://www.pixelpost.org/forum/showthread.php?t=7612
still affects PixelPost 1.7.x
The addon "copy_folder" uses natcasesort to sort the files' list but then iterates on $files with the $k index. Sadly, the key/value association is preserved by natcasesort, making the sort useless.
To fix the bug, just change line 66 and following to:
Code:
foreach($files as $k => $file)
{
if($secondcount < 11) $secondcount = "0$secondcount";
sleep(1);
(instead of: for($k;$k<count($files);$k++))
WARNING: I didn't check if this patch doesn't break anything when using exifdate's sort.
The patch I provided still works, and it's only a very minor change to correct a somewhat major bug ;-) If I wasn't clear enough - I'm not a native English speaker - I'd be glad to reformulate it.
Please correct me if I'm wrong somewhere - but don't leave this bug unfixed (it's a pitty the 1.7.x release doesn't include the patch already).
Kind regards,
the bug I mentionned here :
http://www.pixelpost.org/forum/showthread.php?t=7612
still affects PixelPost 1.7.x
The addon "copy_folder" uses natcasesort to sort the files' list but then iterates on $files with the $k index. Sadly, the key/value association is preserved by natcasesort, making the sort useless.
To fix the bug, just change line 66 and following to:
Code:
foreach($files as $k => $file)
{
if($secondcount < 11) $secondcount = "0$secondcount";
sleep(1);
(instead of: for($k;$k<count($files);$k++))
WARNING: I didn't check if this patch doesn't break anything when using exifdate's sort.
The patch I provided still works, and it's only a very minor change to correct a somewhat major bug ;-) If I wasn't clear enough - I'm not a native English speaker - I'd be glad to reformulate it.
Please correct me if I'm wrong somewhere - but don't leave this bug unfixed (it's a pitty the 1.7.x release doesn't include the patch already).
Kind regards,