Build Process will crash if file stops existing at any point #35

Closed
opened 2022-11-10 14:32:08 +00:00 by ZAdamMac · 1 comment
ZAdamMac commented 2022-11-10 14:32:08 +00:00 (Migrated from github.com)

Describe the bug
A long running backup will crash mid-process if a file vanishes at any point. This bug was originally encountered during the AccessTest function, which nominally should be checking if a file exists, so we have a double bug.

The exception is OSError, so we really just need to add handling for it.

To Reproduce
Steps to reproduce the behavior:

  1. Include a directory that recieves frequent changes, eg. ~/.config/ on an in-use system.
  2. Run the script in default or --inc mode.

Expected behavior
An error should be logged but the actual backup process should continue.

Log/Console Output
-stack trace abbreviated-
OSError: [Errno 6] No such device or address: '/home/patches/.config/discord/SS'

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.5 LTS
  • Version: 2.1.1

Additional context
Exposed during the same ordinary usage as #34 and likely a similarly minor fix. Should be fixed in the same minor release.

**Describe the bug** A long running backup will crash mid-process if a file vanishes at any point. This bug was originally encountered during the AccessTest function, which nominally should be checking if a file exists, so we have a double bug. The exception is OSError, so we really just need to add handling for it. **To Reproduce** Steps to reproduce the behavior: 1. Include a directory that recieves frequent changes, eg. `~/.config/` on an in-use system. 2. Run the script in default or `--inc` mode. **Expected behavior** An error should be logged but the actual backup process should continue. **Log/Console Output** -stack trace abbreviated- OSError: [Errno 6] No such device or address: '/home/patches/.config/discord/SS' **Desktop (please complete the following information):** - OS: Ubuntu 20.04.5 LTS - Version: 2.1.1 **Additional context** Exposed during the same ordinary usage as #34 and likely a similarly minor fix. Should be fixed in the same minor release.
ZAdamMac commented 2023-06-02 17:08:04 +00:00 (Migrated from github.com)

This is now "handled" by printing and logging a warning. Obviously we can't actually back up a file that has stopped existing.

This is now "handled" by printing and logging a warning. Obviously we can't actually back up a file that has stopped existing.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zadammac/Tapestry#35
No description provided.