Fix bug that makes not possible to export hidden files

This commit is contained in:
Rafael 2016-10-27 07:09:46 +02:00
parent 6acd7473d7
commit 7d59566f80
3 changed files with 14 additions and 3 deletions

View file

@ -119,9 +119,14 @@ void ExportThread::run()
}
if (pictureCopyEnabled)
{
QString originalFileName = picture->getPictureFileName();
QFileInfo originalFileInfo(originalFileName);
QString exportFileName = originalFileInfo.fileName();
QString originalFileName = picWidget->getPicturePath();
QString adjustedFileName = originalFileName;
if (adjustedFileName.right(7) == ".hidden") // for the hidden file system
{
adjustedFileName.remove(adjustedFileName.length() - 7, 7);
}
QFileInfo adjustedFileInfo(adjustedFileName);
QString exportFileName = adjustedFileInfo.fileName();
intExportProgress++;
emit exportStringUpdate(ProfileInterface::tr("Export file %1 of %2 files").arg(QString::number(intExportProgress), QString::number(exportCount)));

View file

@ -341,6 +341,11 @@ SnapmaticPicture* SnapmaticWidget::getPicture()
return smpic;
}
QString SnapmaticWidget::getPicturePath()
{
return picPath;
}
QString SnapmaticWidget::getWidgetType()
{
return "SnapmaticWidget";

View file

@ -47,6 +47,7 @@ public:
bool makePictureVisible();
bool makePictureHidden();
SnapmaticPicture *getPicture();
QString getPicturePath();
QString getWidgetType();
bool isSelected();
bool isHidden();