Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Trigger events when moving, creating or deleting files/directories #966

Closed
wants to merge 10 commits into from
Closed

Trigger events when moving, creating or deleting files/directories #966

wants to merge 10 commits into from

Conversation

Alhadis
Copy link
Contributor

@Alhadis Alhadis commented Oct 28, 2016

Redux of #938, which I closed after deciding it was a menial addition that was just bloating your already creaking PR backlog.

Turns out there's a pretty severe concurrency issue involved here. I tried making-do with file-system events and path-watching, and I've found it's actually impossible to monitor the order of events when dragging and dropping.

Example:

  1. A package listens for every new file that's been created or changed, and updates the paths accordingly.
  2. A user moves a file through the tree-view's rename
  3. The tree-view requests an icon for a file path that the package doesn't know is an existing file that's already been matched
  4. Package registers the "new" path as an entirely separate file
  5. Package has no way of knowing whether that was a copy or a move

So... yeah, since this is actually a pretty visible and very tangible problem, I'm reopening.

Alhadis added a commit to file-icons/atom that referenced this pull request Nov 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants