lib/config: Add some info to the folder marker missing (ref #5207) (#6270)

This commit is contained in:
Simon Frei 2020-01-16 15:30:29 +01:00 committed by Jakob Borg
parent 9cc49aea77
commit e782bab9fc
2 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ import (
var ( var (
ErrPathNotDirectory = errors.New("folder path not a directory") ErrPathNotDirectory = errors.New("folder path not a directory")
ErrPathMissing = errors.New("folder path missing") ErrPathMissing = errors.New("folder path missing")
ErrMarkerMissing = errors.New("folder marker missing") ErrMarkerMissing = errors.New("folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)")
) )
const DefaultMarkerName = ".stfolder" const DefaultMarkerName = ".stfolder"

View File

@ -1610,7 +1610,7 @@ func TestROScanRecovery(t *testing.T) {
testOs.Mkdir(fcfg.Path, 0700) testOs.Mkdir(fcfg.Path, 0700)
waitForState(t, sub, "default", "folder marker missing") waitForState(t, sub, "default", config.ErrMarkerMissing.Error())
fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName)) fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
fd.Close() fd.Close()
@ -1619,7 +1619,7 @@ func TestROScanRecovery(t *testing.T) {
testOs.Remove(filepath.Join(fcfg.Path, config.DefaultMarkerName)) testOs.Remove(filepath.Join(fcfg.Path, config.DefaultMarkerName))
waitForState(t, sub, "default", "folder marker missing") waitForState(t, sub, "default", config.ErrMarkerMissing.Error())
testOs.Remove(fcfg.Path) testOs.Remove(fcfg.Path)
@ -1663,7 +1663,7 @@ func TestRWScanRecovery(t *testing.T) {
testOs.Mkdir(fcfg.Path, 0700) testOs.Mkdir(fcfg.Path, 0700)
waitForState(t, sub, "default", "folder marker missing") waitForState(t, sub, "default", config.ErrMarkerMissing.Error())
fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName)) fd := testOs.Create(filepath.Join(fcfg.Path, config.DefaultMarkerName))
fd.Close() fd.Close()
@ -1672,7 +1672,7 @@ func TestRWScanRecovery(t *testing.T) {
testOs.Remove(filepath.Join(fcfg.Path, config.DefaultMarkerName)) testOs.Remove(filepath.Join(fcfg.Path, config.DefaultMarkerName))
waitForState(t, sub, "default", "folder marker missing") waitForState(t, sub, "default", config.ErrMarkerMissing.Error())
testOs.Remove(fcfg.Path) testOs.Remove(fcfg.Path)