diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-04-09 17:40:13 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-04-09 17:40:13 +0800 |
| commit | 9750786a5c03b5ce3ea22b240d1b3cd34990856b (patch) | |
| tree | e495e43245e1bacc86d33142af202613a82a40c1 /src/3rdParty/efsw/FileWatcherGeneric.cpp | |
| parent | 571fb952b99e580a0381f539885f8f175e2ec3b0 (diff) | |
| download | yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.tar.gz yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.tar.bz2 yuescript-9750786a5c03b5ce3ea22b240d1b3cd34990856b.zip | |
Updated efsw. Fixed issue #204.
Diffstat (limited to 'src/3rdParty/efsw/FileWatcherGeneric.cpp')
| -rw-r--r--[-rwxr-xr-x] | src/3rdParty/efsw/FileWatcherGeneric.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/3rdParty/efsw/FileWatcherGeneric.cpp b/src/3rdParty/efsw/FileWatcherGeneric.cpp index 074cff1..3f3c52e 100755..100644 --- a/src/3rdParty/efsw/FileWatcherGeneric.cpp +++ b/src/3rdParty/efsw/FileWatcherGeneric.cpp | |||
| @@ -25,7 +25,7 @@ FileWatcherGeneric::~FileWatcherGeneric() { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | WatchID FileWatcherGeneric::addWatch( const std::string& directory, FileWatchListener* watcher, | 27 | WatchID FileWatcherGeneric::addWatch( const std::string& directory, FileWatchListener* watcher, |
| 28 | bool recursive ) { | 28 | bool recursive, const std::vector<WatcherOption>& options ) { |
| 29 | std::string dir( directory ); | 29 | std::string dir( directory ); |
| 30 | 30 | ||
| 31 | FileSystem::dirAddSlashAtEnd( dir ); | 31 | FileSystem::dirAddSlashAtEnd( dir ); |
| @@ -127,11 +127,13 @@ void FileWatcherGeneric::handleAction( Watcher*, const std::string&, unsigned lo | |||
| 127 | /// Not used | 127 | /// Not used |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | std::list<std::string> FileWatcherGeneric::directories() { | 130 | std::vector<std::string> FileWatcherGeneric::directories() { |
| 131 | std::list<std::string> dirs; | 131 | std::vector<std::string> dirs; |
| 132 | 132 | ||
| 133 | Lock lock( mWatchesLock ); | 133 | Lock lock( mWatchesLock ); |
| 134 | 134 | ||
| 135 | dirs.reserve( mWatches.size() ); | ||
| 136 | |||
| 135 | WatchList::iterator it = mWatches.begin(); | 137 | WatchList::iterator it = mWatches.begin(); |
| 136 | 138 | ||
| 137 | for ( ; it != mWatches.end(); ++it ) { | 139 | for ( ; it != mWatches.end(); ++it ) { |
