mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Workaround for hidden files on Win32
Ride files may be created as hidden files in some instances on Windows 32. This patch ensures that they are subsequently included in the ride list (i.e. ride files can be hidden files). Fixes #176
This commit is contained in:
@@ -273,10 +273,14 @@ QStringList RideFileFactory::listRideFiles(const QDir &dir) const
|
||||
// This will read the user preferences and change the file list order as necessary:
|
||||
boost::shared_ptr<QSettings> settings = GetApplicationSettings();
|
||||
QVariant isAscending = settings->value(GC_ALLRIDES_ASCENDING,Qt::Checked);
|
||||
QFlags<QDir::Filter> spec = QDir::Files;
|
||||
#ifdef Q_OS_WIN32
|
||||
spec |= QDir::Hidden;
|
||||
#endif
|
||||
if(isAscending.toInt()>0){
|
||||
return dir.entryList(filters, QDir::Files, QDir::Name);
|
||||
return dir.entryList(filters, spec, QDir::Name);
|
||||
}
|
||||
return dir.entryList(filters, QDir::Files, QDir::Name|QDir::Reversed);
|
||||
return dir.entryList(filters, spec, QDir::Name|QDir::Reversed);
|
||||
}
|
||||
|
||||
void RideFile::appendPoint(double secs, double cad, double hr, double km,
|
||||
|
||||
Reference in New Issue
Block a user