• Mansour Rahimi's avatar
    os: make MkdirAll support path in extended-length form · 7a1347a1
    Mansour Rahimi authored
    Calling MkdirAll on paths in extended-length form (\\?\-prefixed)
    failed.
    
    MkdirAll calls itself recursively with parent directory of given path in
    its parameter. It finds parent directory by looking for delimiter in
    the path, and taking the left part. When path is in extended-length form,
    it finds empty path at the end.
    
    Here is a sample of path in extended-length form:
    \\?\c:\foo\bar
    
    This change fixes that by passing trailing path separator to MkdirAll (so
    it works for path like \\?\c:\).
    
    Fixes #22230
    
    Change-Id: I363660b262588c5382ea829773d3b6005ab8df3c
    Reviewed-on: https://go-review.googlesource.com/86295Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
    Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    7a1347a1
path.go 3.17 KB