mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 06:14:10 +02:00
Fixed UpdateRebuildFileWatches removing watched directories
This commit is contained in:
parent
18f7a5bd09
commit
61b38b06c5
2 changed files with 17 additions and 1 deletions
|
@ -987,7 +987,11 @@ namespace IDE.Compiler
|
||||||
{
|
{
|
||||||
if (!curWatches.Contains(kv.key))
|
if (!curWatches.Contains(kv.key))
|
||||||
{
|
{
|
||||||
gApp.mFileWatcher.RemoveWatch(kv.key, kv.value);
|
var watchFile = scope String(kv.key);
|
||||||
|
if ((watchFile.EndsWith(Path.DirectorySeparatorChar)) || (watchFile.EndsWith(Path.AltDirectorySeparatorChar)))
|
||||||
|
watchFile.Append("*");
|
||||||
|
gApp.mFileWatcher.RemoveWatch(watchFile, kv.value);
|
||||||
|
//Debug.Assert(!gApp.mFileWatcher.HasDependentObject(kv.value));
|
||||||
oldKeys.Add(kv.key);
|
oldKeys.Add(kv.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,6 +581,18 @@ namespace IDE
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasDependentObject(Object dependentObject)
|
||||||
|
{
|
||||||
|
for (var watchedFileKV in mWatchedFiles)
|
||||||
|
{
|
||||||
|
if (watchedFileKV.value.mDependentObjects.Contains(dependentObject))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (mDependencyChangeSet.Contains(Internal.UnsafeCastToPtr(dependentObject)))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void Update(delegate void(String, String, WatcherChangeTypes) fileChangeHandler = null)
|
public void Update(delegate void(String, String, WatcherChangeTypes) fileChangeHandler = null)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue