From af0071c9b8d8dd0bfe554996a77e170afd36a3f8 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 22 Aug 2000 06:28:33 +0000 Subject: Patch from John Reilly for not processing duplicate files when moving printer driver to download area. (This used to be commit 6e0c9079c385a4f0e61d9f1b1e0351bc4dbc3151) --- source3/printing/nt_printing.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index eefcd2384d..2444c38847 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -516,6 +516,13 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, !strequal(driver->dependentfiles[i], driver->datafile) && !strequal(driver->dependentfiles[i], driver->configfile) && !strequal(driver->dependentfiles[i], driver->helpfile)) { + int j; + for (j=0; j < i; j++) { + if (strequal(driver->dependentfiles[i], driver->dependentfiles[j])) { + goto NextDriver; + } + } + slprintf(old_name, sizeof(old_name), "%s\\%s", architecture, driver->dependentfiles[i]); slprintf(new_name, sizeof(new_name), "%s\\%s", new_dir, driver->dependentfiles[i]); if ((outsize = rename_internals(conn, inbuf, outbuf, old_name, new_name, True)) != 0) { @@ -526,6 +533,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, return False; } } + NextDriver: } } -- cgit