Remove extraneous quote-escape
This commit is contained in:
parent
8a0ab20a70
commit
3e129ac68c
@ -5,13 +5,12 @@ import "C"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DEFAULT_COMMAND = "find * -path '*/\\.*' -prune -o -type f -print -o -type l -print 2> /dev/null"
|
const DEFAULT_COMMAND = `find * -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null`
|
||||||
|
|
||||||
type Reader struct {
|
type Reader struct {
|
||||||
pusher func(string)
|
pusher func(string)
|
||||||
@ -45,8 +44,7 @@ func (r *Reader) readFromStdin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Reader) readFromCommand(cmd string) {
|
func (r *Reader) readFromCommand(cmd string) {
|
||||||
arg := fmt.Sprintf("%q", cmd)
|
listCommand := exec.Command("sh", "-c", cmd)
|
||||||
listCommand := exec.Command("sh", "-c", arg[1:len(arg)-1])
|
|
||||||
out, err := listCommand.StdoutPipe()
|
out, err := listCommand.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user