summaryrefslogtreecommitdiff
path: root/src/fs/fs_file_information.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/fs_file_information.c')
-rw-r--r--src/fs/fs_file_information.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c
index ccba1a8b4..dbcfd81c4 100644
--- a/src/fs/fs_file_information.c
+++ b/src/fs/fs_file_information.c
@@ -112,10 +112,6 @@ GNUNET_FS_file_information_create_from_file(
112 const char *fn; 112 const char *fn;
113 const char *ss; 113 const char *ss;
114 114
115#if WINDOWS
116 char fn_conv[MAX_PATH];
117#endif
118
119 /* FIXME: should include_symbolic_links be GNUNET_NO or GNUNET_YES here? */ 115 /* FIXME: should include_symbolic_links be GNUNET_NO or GNUNET_YES here? */
120 if (GNUNET_OK != 116 if (GNUNET_OK !=
121 GNUNET_DISK_file_size(filename, &fsize, GNUNET_NO, GNUNET_YES)) 117 GNUNET_DISK_file_size(filename, &fsize, GNUNET_NO, GNUNET_YES))
@@ -143,18 +139,12 @@ GNUNET_FS_file_information_create_from_file(
143 return NULL; 139 return NULL;
144 ret->h = h; 140 ret->h = h;
145 ret->filename = GNUNET_strdup(filename); 141 ret->filename = GNUNET_strdup(filename);
146#if !WINDOWS
147 fn = filename; 142 fn = filename;
148#else
149 plibc_conv_to_win_path(filename, fn_conv);
150 fn = fn_conv;
151#endif
152 while (NULL != (ss = strstr(fn, DIR_SEPARATOR_STR))) 143 while (NULL != (ss = strstr(fn, DIR_SEPARATOR_STR)))
153 fn = ss + 1; 144 fn = ss + 1;
154/* FIXME: If we assume that on other platforms CRT is UTF-8-aware, then 145/* FIXME: If we assume that on other platforms CRT is UTF-8-aware, then
155 * this should be changed to EXTRACTOR_METAFORMAT_UTF8 146 * this should be changed to EXTRACTOR_METAFORMAT_UTF8
156 */ 147 */
157#if !WINDOWS
158 GNUNET_CONTAINER_meta_data_insert(ret->meta, 148 GNUNET_CONTAINER_meta_data_insert(ret->meta,
159 "<gnunet>", 149 "<gnunet>",
160 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 150 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
@@ -162,15 +152,6 @@ GNUNET_FS_file_information_create_from_file(
162 "text/plain", 152 "text/plain",
163 fn, 153 fn,
164 strlen(fn) + 1); 154 strlen(fn) + 1);
165#else
166 GNUNET_CONTAINER_meta_data_insert(ret->meta,
167 "<gnunet>",
168 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
169 EXTRACTOR_METAFORMAT_UTF8,
170 "text/plain",
171 fn,
172 strlen(fn) + 1);
173#endif
174 return ret; 155 return ret;
175} 156}
176 157