]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/1.36.2/1.36.2-win32-drive.patch
Commit NULL vol name patch
[bacula/bacula] / bacula / patches / 1.36.2 / 1.36.2-win32-drive.patch
1
2  This patch will prevent the Win32 FD from printing an error message
3  when it attempts to restore the permissions for a drive (which Win32
4  doesn't permit). The error is harmless in any case.
5  Apply the patch to 1.36.2 with
6
7  cd <bacula-source>
8  patch -p0 <1.36.2-win32-drive.patch
9  make
10  ...<F12>
11
12
13 Index: src/findlib/create_file.c
14 ===================================================================
15 RCS file: /cvsroot/bacula/bacula/src/findlib/create_file.c,v
16 retrieving revision 1.34
17 diff -u -r1.34 create_file.c
18 --- src/findlib/create_file.c   27 Jul 2004 21:00:33 -0000      1.34
19 +++ src/findlib/create_file.c   9 Mar 2005 17:52:50 -0000
20 @@ -271,6 +271,12 @@
21          if ((bopen(bfd, attr->ofname, O_WRONLY|O_BINARY, 0)) < 0) {
22             berrno be;
23             be.set_errno(bfd->berrno);
24 +#ifdef HAVE_WIN32
25 +           /* Check for trying to create a drive, if so, skip */
26 +            if (attr->ofname[1] == ':' && attr->ofname[2] == '/' && attr->ofname[3] == 0) {
27 +              return CF_SKIP;
28 +           }
29 +#endif
30              Jmsg2(jcr, M_ERROR, 0, _("Could not open %s: ERR=%s\n"), 
31                   attr->ofname, be.strerror());
32             return CF_ERROR;