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) if (pictureCopyEnabled)
{ {
QString originalFileName = picture->getPictureFileName(); QString originalFileName = picWidget->getPicturePath();
QFileInfo originalFileInfo(originalFileName); QString adjustedFileName = originalFileName;
QString exportFileName = originalFileInfo.fileName(); if (adjustedFileName.right(7) == ".hidden") // for the hidden file system
{
adjustedFileName.remove(adjustedFileName.length() - 7, 7);
}
QFileInfo adjustedFileInfo(adjustedFileName);
QString exportFileName = adjustedFileInfo.fileName();
intExportProgress++; intExportProgress++;
emit exportStringUpdate(ProfileInterface::tr("Export file %1 of %2 files").arg(QString::number(intExportProgress), QString::number(exportCount))); 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; return smpic;
} }
QString SnapmaticWidget::getPicturePath()
{
return picPath;
}
QString SnapmaticWidget::getWidgetType() QString SnapmaticWidget::getWidgetType()
{ {
return "SnapmaticWidget"; return "SnapmaticWidget";

View file

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