Index: src/fs/gnunet-helper-fs-publish.c =================================================================== --- src/fs/gnunet-helper-fs-publish.c (revision 27505) +++ src/fs/gnunet-helper-fs-publish.c (working copy) @@ -287,15 +287,19 @@ struct stat sbuf; uint64_t fsize = 0; - if ((0 != STAT (filename, &sbuf)) || + char *utfFilename; + utfFilename = GNUNET_STRINGS_to_utf8 (filename, strlen (filename), locale_charset ()); + + + if ((0 != STAT (utfFilename, &sbuf)) || ((!S_ISDIR (sbuf.st_mode)) && (GNUNET_OK != GNUNET_DISK_file_size ( - filename, &fsize, GNUNET_NO, GNUNET_YES)))) + utfFilename, &fsize, GNUNET_NO, GNUNET_YES)))) { /* If the file doesn't exist (or is not stat-able for any other reason) skip it (but report it), but do continue. */ if (GNUNET_OK != write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE, - filename, strlen (filename) + 1)) + filename, strlen (filename) + 1)) return GNUNET_SYSERR; /* recoverable error, store 'NULL' in *dst */ *dst = NULL; @@ -307,7 +311,7 @@ write_message (S_ISDIR (sbuf.st_mode) ? GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY : GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_FILE, - filename, strlen (filename) + 1)) + filename, strlen (filename) + 1)) return GNUNET_SYSERR; item = GNUNET_malloc (sizeof (struct ScanTreeNode)); item->filename = GNUNET_strdup (filename); @@ -319,7 +323,7 @@ rc.parent = item; rc.stop = GNUNET_NO; - GNUNET_DISK_directory_scan (filename, + GNUNET_DISK_directory_scan (filename, &scan_callback, &rc); if ( (GNUNET_YES == rc.stop) || @@ -453,9 +457,7 @@ * binary mode. */ _setmode (1, _O_BINARY); - /* Get utf-8-encoded arguments */ - if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) - return 5; + #else ignore_sigpipe (); #endif