Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

error in path rsync in fedora #3

Open
tavoli opened this issue May 24, 2017 · 2 comments
Open

error in path rsync in fedora #3

tavoli opened this issue May 24, 2017 · 2 comments

Comments

@tavoli
Copy link

tavoli commented May 24, 2017

I'm trying to use the command and I get a message:

Sync #1 09:08:23
/bin/sh: /usr/local/bin/rsync: No such file or directory

FATAL: Unable to build directory tree. Is command find available on your OS?

I use fedora 26 and my rsync is in /usr/bin.

Any tips?

@tavoli
Copy link
Author

tavoli commented May 24, 2017

with console.log in err, print this error:

Sync #1 09:25:19

{ Error: stdout maxBuffer exceeded
at Socket.onChildStdout (child_process.js:258:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:561:20) cmd: 'find metting_dev' }

@tavoli
Copy link
Author

tavoli commented May 24, 2017

{maxBuffer: 4096*1024} works for me

// generate directory list

function readdir(path) {
  if(readingDirectoriesFlag) return false;
  readingDirectoriesFlag = true;

  // @todo list hidden directories as well?
  // cp.exec("find " + path + " -type d", function(err, stdout, stderr) {
  // -type d lists directories only, but we want to monitor file changes as well

  cp.exec("find " + path + "", **{maxBuffer: 4096*1024}**, function(err, stdout, stderr) {
    if(err) {
      console.log(err, "FATAL: Unable to build directory tree. Is command find available on your OS?");
      return;
    }

    var files = stdout.split('\n');
    if(files && files.length > 0) {
      files.forEach(function(file){
        if(file) startWatching(file);
      });
    }

    readingDirectoriesFlag = false;
  });
}

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

No branches or pull requests

1 participant