• Jakob Unterwurzacher's avatar
    loopback: fix "touch" on dirs by making root path absolute · bddfd80b
    Jakob Unterwurzacher authored
    When mounting using relative paths, "touch" on directories
    used to fail.
    
    "touch" on files works accidentially because it uses a
    file descriptor internally.
    
      $ loopback b a &
      $ cd b
      $ mkdir foo
      $ touch foo
      touch: setting times of 'foo': Not a directory
    
    strace:
    
      [pid 30185] utimensat(0, "a/foo", [{1468441847, 0}, {1468441847, 0}], AT_SYMLINK_NOFOLLOW <unfinished ...>
      [pid 30185] <... utimensat resumed> )   = -1 ENOTDIR (Not a directory)
    bddfd80b
loopback.go 5.25 KB