Skip to content

Renaming directories with childs on windows locked #144

Description

@FleMo93

When i try to rename a directory which contains at least one other directory, Windows is throwing the error, that the directory is opened by another process.

Minimale code:

const sane = require('sane');

const watcher = sane('watchfiles');
watcher.on('ready', () => console.log("watching..."));
watcher.on('all', (event, path) => {
  console.log(event + " on " + path);
});

Steps to reproduce:

  1. Create directory 'watchfiles' in cwd
  2. Start minimal code example
  3. Create empty directory 'New folder' in './watchfiles'
  4. Create empty directory 'New folder' in './watchfiles/New Folder'
  5. Rename './watchfiles/New Folder' (this directory containg the empty directory) to anything you want
  6. Error should appear
  7. Stop node
  8. Rename should work again

Node: v10.15.3
OS: Windows 10 64bit
OS-Version: 1809

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions