Changeset 462
- Timestamp:
- 05/13/04 23:05:51 (4 years ago)
- Files:
-
- wired/branches/unlabeled-1.13.2/wired/files.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/branches/unlabeled-1.13.2/wired/files.c
r441 r462 1 /* $Id: files.c,v 1.13 2004/05/06 11:10:37morris Exp $ */1 /* $Id: files.c,v 1.13.2.1 2004/05/13 21:05:51 morris Exp $ */ 2 2 3 3 /* … … 658 658 659 659 660 void wd_search(char *path, char *query, bool root ) {660 void wd_search(char *path, char *query, bool root, char *prefix) { 661 661 struct wd_client *client = (struct wd_client *) pthread_getspecific(wd_client_key); 662 662 struct stat sb; … … 756 756 } 757 757 758 /* create display path */ 759 if(prefix) { 760 snprintf(wired_path, sizeof(wired_path), "%s%s", 761 prefix, 762 real_path + strlen(path)); 763 } else { 764 snprintf(wired_path, sizeof(wired_path), "%s%s%s", 765 cur->fts_path + 1, /* skip '.' */ 766 cur->fts_path[strlen(cur->fts_path) - 1] == '/' 767 ? "" /* skip extra '/' */ 768 : "/", 769 cur->fts_name); 770 } 771 758 772 #ifdef HAVE_CORESERVICES_CORESERVICES_H 759 773 /* check if the mac alias points to a directory */ 760 774 if(alias && S_ISDIR(sb.st_mode)) 761 wd_search(real_path, query, false );775 wd_search(real_path, query, false, wired_path); 762 776 #endif 763 777 … … 786 800 } 787 801 788 /* create display path */789 snprintf(wired_path, sizeof(wired_path), "%s%s%s",790 cur->fts_path + 1, /* skip '.' */791 cur->fts_path[strlen(cur->fts_path) - 1] == '/'792 ? "" /* skip extra '/' */793 : "/",794 cur->fts_name);795 796 802 /* reply a 420 for each file */ 797 803 wd_reply(420, "%s%s%u%s%llu",
