antipalindrome / Photoshop-Export-Layers-to-Files-Fast

This script allows you to export your layers as individual files at a speed much faster than the built-in script from Adobe.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filenames choose option "Use layer name (strip extension)" will strip the wrong filename while the file name contains not only one dot

allen880612 opened this issue · comments

I found the Filenames choose option Use layer name (strip extension) will strip the wrong filename while the file name contains ..
ex: layer named test.batch.1.jpg output file will be named test.jpg instead of test.batch.1.jpg.

The problem causing this issue is here.

Replace indexOf with lastIndexOf will solve the problem.
I have created a PR to solve this, please check it, I will be happy to contribute a little to the open-source project!