From a85a1f35d9bb3d3dd75d5f05593abdd1273129b8 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 May 2008 11:28:41 -0400 Subject: [PATCH] When copying a directory, be sure the destination directory is in place first --- src/libply/ply-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index 910b5712..8c68a165 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -927,6 +927,9 @@ ply_copy_directory (const char *source, if (dir == NULL) return false; + if (!ply_create_directory (destination)) + return false; + while ((entry = readdir (dir)) != NULL) { if (strcmp (entry->d_name, ".") == 0)