From: Christian Grothoff Date: Thu, 11 Mar 2010 13:48:36 +0000 (+0000) Subject: ETA calculations, filename X-Git-Tag: initial-import-from-subversion-38251~22507 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b649acef1d260909d21121774bc972774efd65f6;p=oweals%2Fgnunet.git ETA calculations, filename --- diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index 8e6f42636..a110822d1 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c @@ -213,7 +213,12 @@ GNUNET_FS_file_information_create_from_file (void *client_info, return NULL; } fi = GNUNET_malloc (sizeof(struct FileInfo)); - fi->filename = GNUNET_strdup (filename); + fi->filename = GNUNET_STRINGS_filename_expand (filename); + if (fi->filename == NULL) + { + GNUNET_free (fi); + return NULL; + } ret = GNUNET_FS_file_information_create_from_reader (client_info, sbuf.st_size, &data_reader_file, diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index cf249c04b..df566b917 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -901,12 +901,15 @@ do_upload (void *cls, hash_for_index_cb (sc, &p->data.file.file_id); else - GNUNET_CRYPTO_hash_file (sc->h->sched, - GNUNET_SCHEDULER_PRIORITY_IDLE, - p->data.file.filename, - HASHING_BLOCKSIZE, - &hash_for_index_cb, - sc); + { + p->start_time = GNUNET_TIME_absolute_get (); + GNUNET_CRYPTO_hash_file (sc->h->sched, + GNUNET_SCHEDULER_PRIORITY_IDLE, + p->data.file.filename, + HASHING_BLOCKSIZE, + &hash_for_index_cb, + sc); + } return; } publish_content (sc);