diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-09-14 17:33:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-09-14 17:33:29 +0200 |
commit | 99cb656ca9a40ecba3545d84b7c05f4193200b5b (patch) | |
tree | e3f6d2a66ab9a742b02531e3baa36801874912c5 /src/fs | |
parent | dafc5d5bf5d693b63f0b7d4463273d0502cfc9d9 (diff) | |
download | gnunet-gtk-99cb656ca9a40ecba3545d84b7c05f4193200b5b.tar.gz gnunet-gtk-99cb656ca9a40ecba3545d84b7c05f4193200b5b.zip |
fix ftbfs
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-fs-gtk_download-save-as.c | 19 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_publish-dialog.c | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/fs/gnunet-fs-gtk_download-save-as.c b/src/fs/gnunet-fs-gtk_download-save-as.c index b9da6609..cc5592dd 100644 --- a/src/fs/gnunet-fs-gtk_download-save-as.c +++ b/src/fs/gnunet-fs-gtk_download-save-as.c | |||
@@ -78,7 +78,7 @@ clean_up_download_as_context (struct DownloadAsDialogContext *dlc) | |||
78 | g_object_unref (G_OBJECT (dlc->builder)); | 78 | g_object_unref (G_OBJECT (dlc->builder)); |
79 | if (NULL != dlc->dirname) | 79 | if (NULL != dlc->dirname) |
80 | { | 80 | { |
81 | if (0 != RMDIR (dlc->dirname)) | 81 | if (0 != rmdir (dlc->dirname)) |
82 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | 82 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, |
83 | "rmdir", | 83 | "rmdir", |
84 | dlc->dirname); | 84 | dlc->dirname); |
@@ -206,12 +206,12 @@ GNUNET_GTK_save_as_dialog_response_cb (GtkDialog *dialog, | |||
206 | 206 | ||
207 | /* | 207 | /* |
208 | ** FIXME: implement handling for corner cases: | 208 | ** FIXME: implement handling for corner cases: |
209 | * A) Selection changes in search tab while SaveAs dialog is open. | 209 | * A) Selection changes in search tab while SaveAs dialog is open. |
210 | * If it's in direct download mode, ignore that; otherwise destroy the dialog. | 210 | * If it's in direct download mode, ignore that; otherwise destroy the dialog. |
211 | * B) Download! is pressed in download panel (or the search result is otherwise | 211 | * B) Download! is pressed in download panel (or the search result is otherwise |
212 | * being downloaded without using saveas dialog) while SaveAs dialog is open. | 212 | * being downloaded without using saveas dialog) while SaveAs dialog is open. |
213 | * Destroy SaveAs dialog. | 213 | * Destroy SaveAs dialog. |
214 | */ | 214 | */ |
215 | static void | 215 | static void |
216 | open_saveas_dialog (struct DownloadEntry *de, int download_directly) | 216 | open_saveas_dialog (struct DownloadEntry *de, int download_directly) |
217 | { | 217 | { |
@@ -263,11 +263,12 @@ open_saveas_dialog (struct DownloadEntry *de, int download_directly) | |||
263 | 263 | ||
264 | dirname = GNUNET_strdup (de->filename); | 264 | dirname = GNUNET_strdup (de->filename); |
265 | basename = (char *) GNUNET_STRINGS_get_short_name (dirname); | 265 | basename = (char *) GNUNET_STRINGS_get_short_name (dirname); |
266 | /* basename now points into 'dirname'; cut 'dirname' off at the '/' before basename */ | 266 | /* basename now points into 'dirname'; cut 'dirname' off at the '/' before |
267 | * basename */ | ||
267 | if (basename > dirname) | 268 | if (basename > dirname) |
268 | basename[-1] = '\0'; | 269 | basename[-1] = '\0'; |
269 | 270 | ||
270 | if (0 != STAT (dirname, &sbuf)) | 271 | if (0 != stat (dirname, &sbuf)) |
271 | { | 272 | { |
272 | if (GNUNET_OK != GNUNET_DISK_directory_create (dirname)) | 273 | if (GNUNET_OK != GNUNET_DISK_directory_create (dirname)) |
273 | { | 274 | { |
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c index bcd10d30..4ad1c091 100644 --- a/src/fs/gnunet-fs-gtk_publish-dialog.c +++ b/src/fs/gnunet-fs-gtk_publish-dialog.c | |||
@@ -1410,7 +1410,7 @@ add_item (struct AddDirClientContext *adcc, | |||
1410 | struct stat sbuf; | 1410 | struct stat sbuf; |
1411 | uint64_t fsize; | 1411 | uint64_t fsize; |
1412 | 1412 | ||
1413 | if (0 != STAT (item->filename, &sbuf)) | 1413 | if (0 != stat (item->filename, &sbuf)) |
1414 | { | 1414 | { |
1415 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "stat", item->filename); | 1415 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "stat", item->filename); |
1416 | return; | 1416 | return; |