syncthing/lib/versioner
Eric P 3f2742a275
lib/versioner: Fix error in Trashcan restore (fixes: #7965) (#8549)
The restore function of Trash Can ran a rename at the end regardless of whether there was anything to rename. In this case, when the file-to-be-restored did not exist in the destination folder, this resulted in an error. I added a simple check, keeping track of whether the file existed prior to restoring it in the destination folder and depending on this value it will now return nil after the restoration to prevent the renaming function to kick off. Added a test for this specific edge-case as well.
2022-09-20 11:34:15 +02:00
..
_external_test lib/versioner: Test both spaces and parens in ext versioner paths 2016-09-18 12:24:55 +00:00
.gitignore mv internal lib 2015-08-09 09:35:26 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
empty_dir_tracker.go lib/versioner: Purge the empty directories in .stversions (fixes #4406) 2017-11-18 15:56:53 +00:00
empty_dir_tracker_test.go build: Update quic-go for Go 1.19 (#8483) 2022-08-03 15:43:26 +02:00
external.go all: Add build constants for runtime.GOOS comparisons (#8442) 2022-07-28 19:36:39 +02:00
external_test.go all: Add build constants for runtime.GOOS comparisons (#8442) 2022-07-28 19:36:39 +02:00
simple.go lib/versioner: Fix cleaning behaviour (fixes #7988) (#8537) 2022-09-13 19:21:42 +02:00
simple_test.go all: use T.TempDir to create temporary test directory (#8280) 2022-04-15 07:44:06 +04:00
staggered.go lib/versioner: Fix cleaning behaviour (fixes #7988) (#8537) 2022-09-13 19:21:42 +02:00
staggered_test.go all: use T.TempDir to create temporary test directory (#8280) 2022-04-15 07:44:06 +04:00
trashcan.go lib/versioner: Fix error in Trashcan restore (fixes: #7965) (#8549) 2022-09-20 11:34:15 +02:00
trashcan_test.go lib/versioner: Fix error in Trashcan restore (fixes: #7965) (#8549) 2022-09-20 11:34:15 +02:00
util.go lib/versioner: Fix cleaning behaviour (fixes #7988) (#8537) 2022-09-13 19:21:42 +02:00
versioner.go lib/versioner: Improve error messages (fixes #7354) (#7357) 2021-02-12 20:30:51 +01:00