diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/disk.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/util/disk.c b/src/util/disk.c index de37cba0a..4f78c7747 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -625,7 +625,8 @@ GNUNET_DISK_mktemp (const char *t) | |||
625 | * does not exist or stat'ed | 625 | * does not exist or stat'ed |
626 | */ | 626 | */ |
627 | int | 627 | int |
628 | GNUNET_DISK_directory_test (const char *fil, int is_readable) | 628 | GNUNET_DISK_directory_test (const char *fil, |
629 | int is_readable) | ||
629 | { | 630 | { |
630 | struct stat filestat; | 631 | struct stat filestat; |
631 | int ret; | 632 | int ret; |
@@ -639,7 +640,7 @@ GNUNET_DISK_directory_test (const char *fil, int is_readable) | |||
639 | } | 640 | } |
640 | if (!S_ISDIR (filestat.st_mode)) | 641 | if (!S_ISDIR (filestat.st_mode)) |
641 | { | 642 | { |
642 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 643 | LOG (GNUNET_ERROR_TYPE_INFO, |
643 | "A file already exits with the same name %s\n", fil); | 644 | "A file already exits with the same name %s\n", fil); |
644 | return GNUNET_NO; | 645 | return GNUNET_NO; |
645 | } | 646 | } |
@@ -720,7 +721,10 @@ GNUNET_DISK_directory_create (const char *dir) | |||
720 | 721 | ||
721 | rdir = GNUNET_STRINGS_filename_expand (dir); | 722 | rdir = GNUNET_STRINGS_filename_expand (dir); |
722 | if (rdir == NULL) | 723 | if (rdir == NULL) |
724 | { | ||
725 | GNUNET_break (0); | ||
723 | return GNUNET_SYSERR; | 726 | return GNUNET_SYSERR; |
727 | } | ||
724 | 728 | ||
725 | len = strlen (rdir); | 729 | len = strlen (rdir); |
726 | #ifndef MINGW | 730 | #ifndef MINGW |
@@ -756,6 +760,9 @@ GNUNET_DISK_directory_create (const char *dir) | |||
756 | ret = GNUNET_DISK_directory_test (rdir, GNUNET_NO); | 760 | ret = GNUNET_DISK_directory_test (rdir, GNUNET_NO); |
757 | if (GNUNET_NO == ret) | 761 | if (GNUNET_NO == ret) |
758 | { | 762 | { |
763 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
764 | "Creating directory `%s' failed", | ||
765 | rdir); | ||
759 | GNUNET_free (rdir); | 766 | GNUNET_free (rdir); |
760 | return GNUNET_SYSERR; | 767 | return GNUNET_SYSERR; |
761 | } | 768 | } |
@@ -780,6 +787,9 @@ GNUNET_DISK_directory_create (const char *dir) | |||
780 | ret = GNUNET_DISK_directory_test (rdir, GNUNET_NO); | 787 | ret = GNUNET_DISK_directory_test (rdir, GNUNET_NO); |
781 | if (GNUNET_NO == ret) | 788 | if (GNUNET_NO == ret) |
782 | { | 789 | { |
790 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
791 | "Creating directory `%s' failed", | ||
792 | rdir); | ||
783 | GNUNET_free (rdir); | 793 | GNUNET_free (rdir); |
784 | return GNUNET_SYSERR; | 794 | return GNUNET_SYSERR; |
785 | } | 795 | } |
@@ -2684,7 +2694,7 @@ purge_cfg_dir (void *cls, | |||
2684 | { | 2694 | { |
2685 | const char *option = cls; | 2695 | const char *option = cls; |
2686 | char *tmpname; | 2696 | char *tmpname; |
2687 | 2697 | ||
2688 | if (GNUNET_OK != | 2698 | if (GNUNET_OK != |
2689 | GNUNET_CONFIGURATION_get_value_filename (cfg, | 2699 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
2690 | "PATHS", | 2700 | "PATHS", |