posix: Use preparePath only for paths used with syscall or os functions (#3377)

This commit is contained in:
Krishnan Parthasarathi
2016-12-01 10:26:16 +05:30
committed by Harshavardhana
parent 0d59ea1e94
commit feb6685359
3 changed files with 7 additions and 5 deletions

View File

@@ -957,7 +957,7 @@ func (s *posix) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err e
}
// Remove parent dir of the source file if empty
if parentDir := slashpath.Dir(preparePath(srcFilePath)); isDirEmpty(parentDir) {
if parentDir := slashpath.Dir(srcFilePath); isDirEmpty(parentDir) {
deleteFile(srcVolumeDir, parentDir)
}