posix: Return errDiskNotWritable during disk initialization. (#2048)

It can happen that minio server might not have
writable permissions on the export paths command line.

Fixes #2035
This commit is contained in:
Harshavardhana
2016-07-02 01:59:28 -07:00
committed by Anand Babu (AB) Periasamy
parent e5dd917c37
commit d64c3fd464
9 changed files with 131 additions and 27 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ func Test32kUNCPath(t *testing.T) {
// The following calculation was derived empirically. It is not exactly MAX_PATH - len(longDiskName)
// possibly due to expansion rules as mentioned here -
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
remaining := 32767 - 25 - len(longDiskName)
remaining := 32767 - 25 - len(longDiskName) - 10
longDiskName = longDiskName + `\` + strings.Repeat("a", remaining)
}
err = mkdirAll(longDiskName, 0777)