diff --git a/openbr/plugins/gallery/empty.cpp b/openbr/plugins/gallery/empty.cpp index b488d3d..15cba47 100644 --- a/openbr/plugins/gallery/empty.cpp +++ b/openbr/plugins/gallery/empty.cpp @@ -36,6 +36,7 @@ class EmptyGallery : public Gallery BR_PROPERTY(QString, regexp, QString()) qint64 gallerySize; + qint64 filesWritten; void init() { @@ -47,6 +48,7 @@ class EmptyGallery : public Gallery it.next(); gallerySize++; } + filesWritten = 0; } TemplateList readBlock(bool *done) @@ -95,7 +97,9 @@ class EmptyGallery : public Gallery const QString newFormat = file.get("newFormat",QString()); QString destination = file.name + "/" + (file.getBool("preservePath") ? t.file.path()+"/" : QString()); - destination += (newFormat.isEmpty() ? t.file.fileName() : t.file.baseName()+newFormat); + const bool enumerate = file.get("enumerate",false); + destination += t.file.baseName() + (enumerate ? "_"+QString::number(filesWritten++) : QString()); + destination += newFormat.isEmpty() ? t.file.suffix() : newFormat; QMutexLocker diskLocker(&diskLock); // Windows prefers to crash when writing to disk in parallel if (t.isNull()) {