Skip to content

Commit

Permalink
Ignore sidecar dir updates in audio watchers
Browse files Browse the repository at this point in the history
This coordinated access thing is driving me nuts. If access outside the app is
not coordinated, we don't get notifications, so we have to be over zealous. But
then, we get proper notifications if it is, so being over zealous bites us.
Many apps (eg: logic) don't use coordinated access for bounce to disk etc.
Hopefuly this fixes #3 (again) without any other bonus side effects.
  • Loading branch information
themissingcow committed Apr 29, 2020
1 parent fe4128d commit b70388e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Trackomatic/Objects/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@ fileprivate class AudioFolderWatcher : NSObject, NSFilePresenter
}

func presentedSubitemDidChange(at url: URL) {

guard let p = project else { return; }

// Ignore anything in our data directory, sometimes this gets called
// for item changes several layers deep if it's done with coordiantion
// (as our saves are).
if url.path.starts( with: p.sidecarDirectory().path ) { return; }

// Force as our mtime might not have changed
updateFiles( force: true );
}
Expand Down

0 comments on commit b70388e

Please sign in to comment.