expandingTildeInPath

expandingTildeInPath 不仅将’~’替换成home directory 真实路径,还会顺便把字符串尾部的’/’去掉

如果原始的路径是 “~/doc/”, 经过替换, 成了 “/Users/John/doc”, 而不是期待的  “/Users/John/doc/”

 

Leave a Reply

Your email address will not be published. Required fields are marked *