KocsisDaniel/liferay-portal — pull request #94 by vilmospapp (2012-07-30 10:21:01+00:00)
Title: [TECHNICAL SUPPORT] LPS-28094 AdvancedFileSystemStore fails on moving files with index higher than 100

Hi Dani,

If you upload at least 100+ images in the document and media library and try to move the 100th or later images into a subdirectory, when you try to edit the image you will notice, that the image is not found and not displayed as physically is not moved to the subdirectory and the system cannot find it there.

The root cause of this is the limitation of the File.renameTo() call what is delegates the directory movement to native system calls and has problem if the new path contains missing folders above the last folder.

I made a fix by always creating parent directory structure with calling mkdirs() on the parent directory of the target file/directory.

Regards.
Vilmos