Changeset View
Changeset View
Standalone View
Standalone View
src/file/filewatch.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | |||||
95 | void FileWatch::watchFolder(const QString& path) | 95 | void FileWatch::watchFolder(const QString& path) | ||
96 | { | 96 | { | ||
97 | qCDebug(BALOO) << path; | 97 | qCDebug(BALOO) << path; | ||
98 | if (m_dirWatch && !m_dirWatch->watchingPath(path)) { | 98 | if (m_dirWatch && !m_dirWatch->watchingPath(path)) { | ||
99 | KInotify::WatchEvents flags(KInotify::EventMove | KInotify::EventDelete | KInotify::EventDeleteSelf | 99 | KInotify::WatchEvents flags(KInotify::EventMove | KInotify::EventDelete | KInotify::EventDeleteSelf | ||
100 | | KInotify::EventCloseWrite | KInotify::EventCreate | 100 | | KInotify::EventCloseWrite | KInotify::EventCreate | ||
101 | | KInotify::EventAttributeChange | KInotify::EventModify); | 101 | | KInotify::EventAttributeChange | KInotify::EventModify); | ||
102 | 102 | | |||
103 | m_dirWatch->addWatch(path, flags, KInotify::WatchFlags()); | 103 | m_dirWatch->addWatch(path, flags, KInotify::FlagOnlyDir); | ||
104 | } | 104 | } | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | void FileWatch::slotFileMoved(const QString& urlFrom, const QString& urlTo) | 107 | void FileWatch::slotFileMoved(const QString& urlFrom, const QString& urlTo) | ||
108 | { | 108 | { | ||
109 | if (m_config->shouldBeIndexed(urlTo)) { | 109 | if (m_config->shouldBeIndexed(urlTo)) { | ||
110 | m_metadataMover->moveFileMetadata(urlFrom, urlTo); | 110 | m_metadataMover->moveFileMetadata(urlFrom, urlTo); | ||
111 | } else { | 111 | } else { | ||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |