mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Handle broken symlinks, Simple versioner (fixes #1071)
This commit is contained in:
parent
3e26fdfb67
commit
d38c81fcff
@ -55,7 +55,7 @@ func NewSimple(folderID, folderPath string, params map[string]string) Versioner
|
|||||||
// Move away the named file to a version archive. If this function returns
|
// Move away the named file to a version archive. If this function returns
|
||||||
// nil, the named file does not exist any more (has been archived).
|
// nil, the named file does not exist any more (has been archived).
|
||||||
func (v Simple) Archive(filePath string) error {
|
func (v Simple) Archive(filePath string) error {
|
||||||
fileInfo, err := os.Stat(filePath)
|
fileInfo, err := os.Lstat(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
if debug {
|
if debug {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user