Subject Re: [ib-support] Re: --* Please Help*--- Database corruption and cannot backup & restore
Author Doug Chamberlin
Using GetFullPathName is not a complete solution because it depends on how
you use it. The documentation says:

The GetFullPathName function merges the name of the current drive and
directory with the specified filename to determine the full path and
filename of the specified file. It also calculates the address of the
filename portion of the full path and filename. This function does not
verify that the resulting path and filename are valid or that they refer to
an existing file on the associated volume.

Therefore, according to this you have to set the current drive and
directory first, then call GetFullPathName. If you are going to do that
then you might as well parse the file name yourself!

Now it may, in fact, work other than described above. (It wouldn't be the
first time!)

Munging with the filepath that is sent from the client is not foolproof,
however. UNC style filenames are completely different. They have no drive
letter. Thus there are several canonical instances of filepath which
properly refer to the same file and are not the same.

The only problem I see (besides locking out gstat) of opening the GDB files
exclusively is the possibility of the IB server process hanging up in some
fashion which leaves the GDB file inaccessible until the server machine is
rebooted. That would be very harsh and I don't believe we are far enough up
the reliability curve to rule it out.