| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Make some keys not required in BackupDaemonConfigVerify, and verify them
afterwards instead, when the rest of the configuration file has been read
(and in future, the store type would be known.)
|
| |
|
|
|
|
|
| |
If the item is not present (the end of the Archive is reached instead) then a
default value is returned instead of throwing an exception.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Unlike the rest of the Win32 API, these functions return their error code,
and it's not accessible using GetLastError(). Thanks to Enrique Perez-Terron
for reporting this issue.
|
|
|
|
|
|
| |
Once again, the Windows issue of being unable to delete or overwrite an
open file causes issues. In this case it's only test failures. We need to
be diligent about closing open file handles and protocol sessions in tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes test failures caused by using seconds since epoch on Windows, instead
of a box_time_t, and rounding it to the nearest 10^6, which is fine for a
box_time_t (all other platforms), but 10^6 seconds is a rather long time to
ignore changes for on Windows.
This also makes it possible to support subsecond precision on Windows
via FileModificationTime() in future, and have RaidFile detect such subsecond
changes.
|
|
|
|
|
|
| |
On Windows we can't delete the file while it's open, and we don't need to,
because we opened it for exclusive use, so another process can't lock it
between us unlocking and deleting it.
|
|
|
|
|
|
|
|
|
|
|
| |
The old assertion, that the write lock file exists before starting checking,
was erroneously passing before when no lock was held, because the lockfile
was never deleted. Now that we delete it when unlocking the account, this
started causing test failures.
Changed the way that accounts are checked for errors to use a function that
acquires a write lock first, and modified test to disconnect open clients
before starting checking the account, to fix it.
|
| |
|
| |
|
|
|
|
|
| |
E.g. you can run with -L NamedLock.cpp to only show messages logged in
that file. You can also repeat it to only show messages from certain files.
|
| |
|
|
|
|
| |
Deleting the account deletes the lockfile, so unlocking fails.
|
|
|
|
| |
with it.
|
| |
|
|
|
|
|
| |
Allows the exception message to be captured before it goes out of scope.
|
| |
|
|
|
|
|
| |
NamedLock simply didn't work before. This may cause test failures, but the
tests are already failing on Windows, and must be fixed.
|
|
|
|
| |
Files need to be closed before renaming over them on Windows.
|
|
|
|
|
|
| |
Consistently capture the last Windows error code in the global variable
winerrno. Add logging macros that report the Windows error message for
this error code.
|
|
|
|
| |
Timer.cpp.
|
| |
|
|
|
|
| |
Allows Archive to be used safely on network streams.
|
|
|
|
|
|
| |
The call to decrement the refcount was in an ASSERT macro, so compiled out in
release mode.
|
| |
|
| |
|
|
|
|
|
| |
Should make the Travis logs shorter and more readable.
|
| |
|
|
|
|
|
|
| |
We have more fine-grained control over logging now, including ability to log
to a file in bbackupquery and all daemons, and users can't redirect stderr on
Windows. https://www.boxbackup.org/ticket/50
|
| |
|
| |
|
| |
|
|
|
|
| |
Work in UTC inside Box Backup, not local time.
|
| |
|
|
|
|
|
|
| |
We need to use the saved Windows error code from GetLastError(), rather than
calling it again, because another system call has run in the mean time and
GetLastError() will now return 0.
|
|
|
|
|
|
| |
Fixes tests broken by changing current directory, for example in bbackupquery,
which meant that the report file was written in the wrong place and couldn't
be found by the test, causing a failure.
|
|
|
|
| |
Broken by previous changes to introduce overlapped I/O for writes.
|
|
|
|
| |
Improve correctness and reduce code duplication in bbackupctl.
|
| |
|
| |
|
|
|
|
|
| |
The mysterious case of the missing Write(const std::string&) in the
night-time, or rather in subclasses of IOStream which declares it.
|
|
|
|
|
| |
Use the new macros to ensure that exceptions contain a message and filename,
following the new standard format.
|
|
|
|
|
|
|
| |
On Windows, plain stat() no longer handles slashes in filenames correctly
(since upgrading MinGW? Or switching to 64-bit Windows?). We need to use
POSIX fstat() for now in RaidFile, but we can still use the emu_stat,
and in fact we should, to fix path translation.
|
| |
|