Author: mpiulachs
Date: Wed Jan 30 02:48:40 2008
New Revision: 32043
URL:
http://svn.reactos.org/svn/reactos?rev=32043&view=rev
Log:
sync to wine-0.9.54
Modified:
trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c
Modified: trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c (original)
+++ trunk/reactos/base/applications/cmdutils/xcopy/xcopy.c Wed Jan 30 02:48:40 2008
@@ -507,6 +507,7 @@
BOOL copiedFile = FALSE;
DWORD destAttribs, srcAttribs;
BOOL skipFile;
+ int ret = 0;
/* Allocate some working memory on heap to minimize footprint */
finddata = HeapAlloc(GetProcessHeap(), 0, sizeof(WIN32_FIND_DATA));
@@ -718,7 +719,8 @@
if (flags & OPT_IGNOREERRORS) {
skipFile = TRUE;
} else {
- return RC_WRITEERROR;
+ ret = RC_WRITEERROR;
+ goto cleanup;
}
}
@@ -780,12 +782,14 @@
}
}
+cleanup:
+
/* free up memory */
HeapFree(GetProcessHeap(), 0, finddata);
HeapFree(GetProcessHeap(), 0, inputpath);
HeapFree(GetProcessHeap(), 0, outputpath);
- return 0;
+ return ret;
}
/* =========================================================================