From 0af44eadb6892a25695d8646334baebf96e5222a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 16 Aug 2010 11:51:50 +0000 Subject: [PATCH] Fix possible folder watching issues on Windows --- src/filesystemwatcher.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filesystemwatcher.h b/src/filesystemwatcher.h index 95bc198c7..76aa87f6e 100644 --- a/src/filesystemwatcher.h +++ b/src/filesystemwatcher.h @@ -203,7 +203,11 @@ private: void addTorrentsFromDir(const QDir &dir, QStringList &torrents) { const QStringList files = dir.entryList(filters, QDir::Files, QDir::Unsorted); foreach(const QString &file, files) { - torrents << dir.canonicalPath() + '/' + file; +#if defined(Q_WS_WIN) || defined(Q_OS_OS2) + torrents << dir.absoluteFilePath(file).replace("/", "\\"); +#else + torrents << dir.absoluteFilePath(file); +#endif } }