Mercurial > minori
comparison src/library/library.cc @ 398:650a9159a0e7
filesystem: implement win32 watchers
These are really nice :)
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 07 Nov 2025 14:32:11 -0500 |
| parents | 963047512d34 |
| children |
comparison
equal
deleted
inserted
replaced
| 397:811697ad826a | 398:650a9159a0e7 |
|---|---|
| 14 namespace Library { | 14 namespace Library { |
| 15 | 15 |
| 16 Database::Database() | 16 Database::Database() |
| 17 { | 17 { |
| 18 /* Do this immediately :) */ | 18 /* Do this immediately :) */ |
| 19 /* Nevermind, this causes an immediate segfault on Windows | |
| 19 UpdateWatchers(); | 20 UpdateWatchers(); |
| 21 */ | |
| 20 } | 22 } |
| 21 | 23 |
| 22 void Database::UpdateWatchers() | 24 void Database::UpdateWatchers() |
| 23 { | 25 { |
| 24 /* TODO also need to remove unused watchers */ | 26 /* TODO also need to remove unused watchers */ |
| 27 | |
| 25 for (const auto &p : session.config.library.paths) { | 28 for (const auto &p : session.config.library.paths) { |
| 26 if (watchers_.count(p)) | 29 if (watchers_.count(p)) |
| 27 continue; | 30 continue; |
| 28 | 31 |
| 29 watchers_[p].reset( | 32 watchers_[p].reset( |
