Ticket #229 (assigned defect)
Stub databases should be read with msvc_posix_open
| Reported by: | richard | Owned by: | richard |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Other | Version: | SVN trunk |
| Severity: | normal | Keywords: | |
| Cc: | olly | Blocked By: | |
| Operating System: | Microsoft Windows | Blocking: |
Description
Currently, stub databases are read using a standard C++ ifstream. (See backends/database.cc, function open_stub()) This works fine, except that if a user (or the database replication code) tries, on Windows, to atomically rename a new stub db file over an existing one, it will receive an error if the old stub DB file was open.
This can be avoided if we instead use msvc_posix_open() (or just open() on unix) in open_stub() to get a file handle for the stub database, and access it using C file-handling routines.
Change History
Note: See
TracTickets for help on using
tickets.
