parent
							
								
									2f135cd373
								
							
						
					
					
						commit
						522cb469b7
					
				
					 1 changed files with 14 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -30,6 +30,7 @@
 | 
			
		|||
#include <QList>
 | 
			
		||||
#else
 | 
			
		||||
#include "sys/types.h"
 | 
			
		||||
#include "sys/stat.h"
 | 
			
		||||
#include "dirent.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +48,7 @@ void ProfileLoader::run()
 | 
			
		|||
 | 
			
		||||
#ifdef Q_OS_WIN
 | 
			
		||||
    QDir dir(profileFolder);
 | 
			
		||||
    const QStringList files = dir.entryList();
 | 
			
		||||
    const QStringList files = dir.entryList(QDir::Files);
 | 
			
		||||
    for (const QString &fileName : files) {
 | 
			
		||||
        if (fileName.startsWith("SGTA5") && !fileName.endsWith(".bak")) {
 | 
			
		||||
            savegameFiles << fileName;
 | 
			
		||||
| 
						 | 
				
			
			@ -63,6 +64,10 @@ void ProfileLoader::run()
 | 
			
		|||
    struct dirent *dp;
 | 
			
		||||
    while ((dp = readdir(dirp)) != 0) {
 | 
			
		||||
        const QString fileName = QString::fromUtf8(dp->d_name);
 | 
			
		||||
        const QString filePath = profileFolder % "/" % fileName;
 | 
			
		||||
        struct stat fileStat;
 | 
			
		||||
        stat(filePath.toUtf8().constData(), &fileStat);
 | 
			
		||||
        if (S_ISREG(fileStat.st_mode) != 0) {
 | 
			
		||||
            if (fileName.startsWith("SGTA5") && !fileName.endsWith(".bak")) {
 | 
			
		||||
                savegameFiles << fileName;
 | 
			
		||||
                maximumV++;
 | 
			
		||||
| 
						 | 
				
			
			@ -72,6 +77,7 @@ void ProfileLoader::run()
 | 
			
		|||
                maximumV++;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    closedir(dirp);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue