diff options
author | Tim Potter <tpot@samba.org> | 2000-08-22 06:28:33 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-08-22 06:28:33 +0000 |
commit | af0071c9b8d8dd0bfe554996a77e170afd36a3f8 (patch) | |
tree | a662869053917472d550ba35dc110ab77064525b | |
parent | d8ad8a0d74be4e2243ded4385692e7586fe75127 (diff) | |
download | samba-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)
-rw-r--r-- | source3/printing/nt_printing.c | 8 |
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: } } |