downloadextractthread.cpp
inline bool isMountPoint(const QString &folder)
{
    struct stat statFolder, statParent;
    QFileInfo fi(folder);
    QByteArray folderAscii = folder.toLatin1();
    QByteArray parentDir   = fi.dir().path().toLatin1();

    if ( ::stat(folderAscii.constData(), &statFolder) == -1
         || ::stat(parentDir.constData(), &statParent) == -1)
    {
        return false;
    }

    return (statFolder.st_dev != statParent.st_dev);
}
/* Returns true if folder lives on a different device than parent directory */
Returns true if folder lives on a different device than parent directory
Returns true if folder lives on a different device than parent directory
inline bool isMountPoint(const QString &folder)
{
    struct stat statFolder, statParent;
    QFileInfo fi(folder);
    QByteArray folderAscii = folder.toLatin1();
    QByteArray parentDir   = fi.dir().path().toLatin1();
    if ( ::stat(folderAscii.constData(), &statFolder) == -1
         || ::stat(parentDir.constData(), &statParent) == -1)
    {
        return false;
    }
    return (statFolder.st_dev != statParent.st_dev);
}
inline bool isMountPoint ( const QString & folder ) { struct stat statFolder , statParent ; QFileInfo fi ( folder ) ; QByteArray folderAscii = folder . toLatin1 ( ) ; QByteArray parentDir = fi . dir ( ) . path ( ) . toLatin1 ( ) ; if ( :: stat ( folderAscii . constData ( ) , & statFolder ) == -1 || :: stat ( parentDir . constData ( ) , & statParent ) == -1 ) { return false ; } return ( statFolder . st_dev != statParent . st_dev ) ; }
Returns true if folder lives on a different device than parent directory
Returns true if folder lives on a different device than parent directory