https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277060
Ganael LAPLANCHE <marty...@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marty...@freebsd.org Status|New |In Progress --- Comment #1 from Ganael LAPLANCHE <marty...@freebsd.org> --- Hello, I am facing the same bug too : $ mkdir -p /tmp/src/foo/bar $ rm -rf /tmp/dst ; mkdir -p /tmp/dst $ cd /tmp/src $ echo 'foo/bar/' | /bin/pax -r -w -d -pe "/tmp/dst" <looping infinitely> Here, pax(1) infinitely deletes and re-creates /tmp/dst/foo/bar/. The problem is that chk_path() (bin/pax/file_subs.c), called from node_creat() also creates the leaf directory when a trailing '/' appears in the directory name to create. When the execution goes back from chk_path() to node_creat(), the function still cannot create the leaf directory (it has been created by chk_path()), so it unlinks it and calls node_creat() again. The function re-creates it, and so on... A possible fix is to make node_creat() detect trailing slashes so it does NOT create a leaf directory but only intermediate ones. I've added a simple check in that way in the attached patch. Best regards, Ganael. -- You are receiving this mail because: You are the assignee for the bug.