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

onDidChangePath not called for fs.renameSync on Linux #92

Description

@winstliu

Simple repro steps:

# init.coffee
atom.workspace.observeActivePaneItems (item) ->
  item.onDidChangePath ->
    console.log 'PATH CHANGED'
// Dev tools
var fs = require('fs-plus');
var bufferToChange = atom.workspace.getActivePaneItem();
var filePath = bufferToChange.getPath();
var newPath = filePath + "2";
fs.moveSync(filePath, newPath);  //or .removeSync()

Observe that 'PATH CHANGED' does not appear in the console. If you change moveSync to .saveAs(), 'PATH CHANGED' will appear.

To verify that a fix works just make sure this text-buffer spec passes on Linux.

Refs atom/atom#7315.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions