checkForUSBStick(): look for etc/psa_config in mountpath-directory.
This commit is contained in:
		@@ -251,8 +251,7 @@ bool System::test_dir(const QString& dir)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool System::checkForUSBStick()
 | 
					std::optional<QString> System::checkForUSBStick(QString const &dirPathUnderMountPath) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
#if defined (ARCH_DesktopLinux)
 | 
					#if defined (ARCH_DesktopLinux)
 | 
				
			||||||
    // DEBUG / TEST:
 | 
					    // DEBUG / TEST:
 | 
				
			||||||
    if (QFileInfo(getUSBMountPath()).isDir())
 | 
					    if (QFileInfo(getUSBMountPath()).isDir())
 | 
				
			||||||
@@ -261,11 +260,9 @@ bool System::checkForUSBStick()
 | 
				
			|||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (getUSBMountPath().isEmpty()) {
 | 
					    QString const &mountPath = getUSBMountPath(dirPathUnderMountPath);
 | 
				
			||||||
        return false;
 | 
					    // qCritical() << "MOUNT-PATH" << mountPath;
 | 
				
			||||||
    }
 | 
					    return mountPath.isEmpty() ? std::nullopt : std::optional<QString>(mountPath);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return true;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user