mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Avoid long "hanging" if Windows UNC path is not reachable
Use own "isDirExisting" function checking UNC paths
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QFileInfoList>
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -144,6 +145,14 @@ namespace BlackMisc
|
||||
//! Get the existing directories
|
||||
static QStringList getExistingUnemptyDirectories(const QStringList &directories);
|
||||
|
||||
//! Directory existing? Also checking UNC paths upfront.
|
||||
//! \remark Motivation: if an UNC cannot be accessed (e.g. machine is down) it can take very long before functions like QDir respond
|
||||
//! \remark for non-UNC paths it is the same as the QDir checks
|
||||
//! @{
|
||||
static bool isDirExisting(const QString &path);
|
||||
static bool isDirExisting(const QDir &dir);
|
||||
//! @}
|
||||
|
||||
//! Result of directory comparison
|
||||
struct DirComparison
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user