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

onDidChangePath not called for fs.renameSync on Linux #92

Open
winstliu opened this issue Sep 22, 2015 · 0 comments
Open

onDidChangePath not called for fs.renameSync on Linux #92

winstliu opened this issue Sep 22, 2015 · 0 comments

Comments

@winstliu
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant