Module Name: othersrc
Committed By: stacktic
Date: Tue Apr 14 18:36:54 UTC 2009
Modified Files:
othersrc/bin/fsu_ecp: fsu_ecp.c
Log Message:
Fixed a bug with symlink
Problem reported by Antti Kantee
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 othersrc/bin/fsu_ecp/fsu_ecp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/bin/fsu_ecp/fsu_ecp.c
diff -u othersrc/bin/fsu_ecp/fsu_ecp.c:1.5 othersrc/bin/fsu_ecp/fsu_ecp.c:1.6
--- othersrc/bin/fsu_ecp/fsu_ecp.c:1.5 Sun Apr 12 23:02:43 2009
+++ othersrc/bin/fsu_ecp/fsu_ecp.c Tue Apr 14 18:36:53 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_ecp.c,v 1.5 2009/04/12 23:02:43 stacktic Exp $ */
+/* $NetBSD: fsu_ecp.c,v 1.6 2009/04/14 18:36:53 stacktic Exp $ */
/*
* Copyright (c) 2008 Arnaud Ysmal. All Rights Reserved.
@@ -270,7 +270,7 @@
off = root->pathlen;
LIST_FOREACH(cur, flist, next) {
- if (cur == root || cur->sb.st_nlink == 1)
+ if (S_ISDIR(cur->sb.st_mode) || cur->sb.st_nlink == 1)
continue;
new = malloc(sizeof(struct hardlink_s));
@@ -395,7 +395,10 @@
rv = ukfs_link(fs, hlfrom, hlto);
if (rv != 0 && errno == EOPNOTSUPP) {
hl_supported = 0;
- copy_filein(fs, hlfrom, hlto);
+ if (flags & FSU_ECP_GET)
+ copy_fileout(hlfrom, hlto);
+ else
+ copy_filein(fs, hlfrom, hlto);
}
} else {
if (flags & FSU_ECP_GET)