Browse Source

etcdmain: use symlink instead of link for v0.4 files

link doesn't support directory.
Yicheng Qin 11 years ago
parent
commit
92b329fdb9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdmain/etcd.go

+ 1 - 1
etcdmain/etcd.go

@@ -360,7 +360,7 @@ func makeMemberDir(dir string) error {
 			// Link it to the subdir and keep the v1 file at the original
 			// Link it to the subdir and keep the v1 file at the original
 			// location, so v0.4 etcd can still bootstrap if the upgrade
 			// location, so v0.4 etcd can still bootstrap if the upgrade
 			// failed.
 			// failed.
-			if err := os.Link(path.Join(dir, name), path.Join(membdir, name)); err != nil {
+			if err := os.Symlink(path.Join(dir, name), path.Join(membdir, name)); err != nil {
 				return err
 				return err
 			}
 			}
 		case v2Files.Contains(name):
 		case v2Files.Contains(name):