From f6f62a01a9e39bd468401cc3a9d90adc59941ad6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 16 Aug 2010 11:58:55 +0000 Subject: [PATCH] Fix possible folder watching issues on Windows --- Changelog | 1 + src/filesystemwatcher.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 3368f0182..2e9ed8a3f 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ - BUGFIX: Added missing right-click menu icon in Web UI - BUGFIX: Fix speed limit sliders initialization in Web UI - BUGFIX: Priority actions are only effective if the transfer list tab is displayed + - BUGFIX: Fix possible folder watching issues on Windows and OS/2 * Tue Jul 27 2010 - Christophe Dumez - v2.3.0 - FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible) diff --git a/src/filesystemwatcher.h b/src/filesystemwatcher.h index 9c9e8c61c..18c8bb3f2 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 } };