summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-08-22 06:28:33 +0000
committerTim Potter <tpot@samba.org>2000-08-22 06:28:33 +0000
commitaf0071c9b8d8dd0bfe554996a77e170afd36a3f8 (patch)
treea662869053917472d550ba35dc110ab77064525b /source3
parentd8ad8a0d74be4e2243ded4385692e7586fe75127 (diff)
downloadsamba-af0071c9b8d8dd0bfe554996a77e170afd36a3f8.tar.gz
samba-af0071c9b8d8dd0bfe554996a77e170afd36a3f8.tar.bz2
samba-af0071c9b8d8dd0bfe554996a77e170afd36a3f8.zip
Patch from John Reilly <jreilly@hp.com> for not processing duplicate files
when moving printer driver to download area. (This used to be commit 6e0c9079c385a4f0e61d9f1b1e0351bc4dbc3151)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c8
1 files changed, 8 insertions, 0 deletions
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:
}
}