aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/download.c')
-rw-r--r--src/plugins/fs/download.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index acc3df2c..3a9c4e06 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -124,6 +124,9 @@ static void initiateDownload(GtkTreeModel * model,
124 GtkTreePath *dirTreePath; 124 GtkTreePath *dirTreePath;
125 char *dirPath; 125 char *dirPath;
126 unsigned int dirPathLen; 126 unsigned int dirPathLen;
127#ifdef WINDOWS
128 char *filehash;
129#endif
127 130
128 uri = NULL; 131 uri = NULL;
129 meta = NULL; 132 meta = NULL;
@@ -172,7 +175,15 @@ static void initiateDownload(GtkTreeModel * model,
172 } 175 }
173 176
174 if (name == NULL) 177 if (name == NULL)
178#ifdef WINDOWS
179 {
180 filehash = STRDUP(uri_name);
181 filehash[16] = 0;
182 name = filehash;
183 }
184#else
175 name = uri_name; 185 name = uri_name;
186#endif
176 187
177 final_download_dir = getFileName("FS", 188 final_download_dir = getFileName("FS",
178 "INCOMINGDIR", 189 "INCOMINGDIR",
@@ -271,6 +282,9 @@ static void initiateDownload(GtkTreeModel * model,
271 -1); 282 -1);
272 FREE(uri_name); 283 FREE(uri_name);
273 FREE(dirPath); 284 FREE(dirPath);
285#ifdef WINDOWS
286 FREENONNULL(filehash);
287#endif
274 FREENONNULL(final_download_dir); 288 FREENONNULL(final_download_dir);
275 289
276 290