Fix bug that makes not possible to export hidden files
This commit is contained in:
		
							parent
							
								
									6acd7473d7
								
							
						
					
					
						commit
						7d59566f80
					
				
					 3 changed files with 14 additions and 3 deletions
				
			
		|  | @ -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))); | ||||
|  |  | |||
|  | @ -341,6 +341,11 @@ SnapmaticPicture* SnapmaticWidget::getPicture() | |||
|     return smpic; | ||||
| } | ||||
| 
 | ||||
| QString SnapmaticWidget::getPicturePath() | ||||
| { | ||||
|     return picPath; | ||||
| } | ||||
| 
 | ||||
| QString SnapmaticWidget::getWidgetType() | ||||
| { | ||||
|     return "SnapmaticWidget"; | ||||
|  |  | |||
|  | @ -47,6 +47,7 @@ public: | |||
|     bool makePictureVisible(); | ||||
|     bool makePictureHidden(); | ||||
|     SnapmaticPicture *getPicture(); | ||||
|     QString getPicturePath(); | ||||
|     QString getWidgetType(); | ||||
|     bool isSelected(); | ||||
|     bool isHidden(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue