mirror of
https://github.com/syncthing/syncthing.git
synced 2026-01-19 03:07:54 -05:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8ac9721d7 | ||
|
|
b1b68b58fe | ||
|
|
ca21db9481 | ||
|
|
93ad803073 | ||
|
|
6cc7f70a65 | ||
|
|
2b0c33f74d | ||
|
|
dae1d36a23 | ||
|
|
824fa8f17a | ||
|
|
31cd0b943c | ||
|
|
070eced2f6 | ||
|
|
986f8dfb2e | ||
|
|
8c0c03eb38 | ||
|
|
fd9bc20bc5 | ||
|
|
089fca2319 | ||
|
|
e936890927 | ||
|
|
0450d48f89 | ||
|
|
2b2cae2d50 | ||
|
|
f73d5a9ab2 |
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/syncthing/protocol",
|
||||
"Rev": "e7db2648034fb71b051902a02bc25d4468ed492e"
|
||||
"Rev": "95e15c95f21b81b09772f07de5c142a3e68f78db"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/syndtr/goleveldb/leveldb",
|
||||
|
||||
59
Godeps/_workspace/src/github.com/syncthing/protocol/protocol.go
generated
vendored
59
Godeps/_workspace/src/github.com/syncthing/protocol/protocol.go
generated
vendored
@@ -31,8 +31,7 @@ const (
|
||||
|
||||
const (
|
||||
stateInitial = iota
|
||||
stateCCRcvd
|
||||
stateIdxRcvd
|
||||
stateReady
|
||||
)
|
||||
|
||||
// FileInfo flags
|
||||
@@ -103,7 +102,6 @@ type rawConnection struct {
|
||||
id DeviceID
|
||||
name string
|
||||
receiver Model
|
||||
state int
|
||||
|
||||
cr *countingReader
|
||||
cw *countingWriter
|
||||
@@ -142,9 +140,9 @@ type isEofer interface {
|
||||
IsEOF() bool
|
||||
}
|
||||
|
||||
const (
|
||||
pingTimeout = 30 * time.Second
|
||||
pingIdleTime = 60 * time.Second
|
||||
var (
|
||||
PingTimeout = 30 * time.Second
|
||||
PingIdleTime = 60 * time.Second
|
||||
)
|
||||
|
||||
func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiver Model, name string, compress Compression) Connection {
|
||||
@@ -155,7 +153,6 @@ func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiv
|
||||
id: deviceID,
|
||||
name: name,
|
||||
receiver: nativeModel{receiver},
|
||||
state: stateInitial,
|
||||
cr: cr,
|
||||
cw: cw,
|
||||
outbox: make(chan hdrMsg),
|
||||
@@ -285,6 +282,7 @@ func (c *rawConnection) readerLoop() (err error) {
|
||||
c.close(err)
|
||||
}()
|
||||
|
||||
state := stateInitial
|
||||
for {
|
||||
select {
|
||||
case <-c.closed:
|
||||
@@ -298,47 +296,54 @@ func (c *rawConnection) readerLoop() (err error) {
|
||||
}
|
||||
|
||||
switch msg := msg.(type) {
|
||||
case ClusterConfigMessage:
|
||||
if state != stateInitial {
|
||||
return fmt.Errorf("protocol error: cluster config message in state %d", state)
|
||||
}
|
||||
go c.receiver.ClusterConfig(c.id, msg)
|
||||
state = stateReady
|
||||
|
||||
case IndexMessage:
|
||||
switch hdr.msgType {
|
||||
case messageTypeIndex:
|
||||
if c.state < stateCCRcvd {
|
||||
return fmt.Errorf("protocol error: index message in state %d", c.state)
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: index message in state %d", state)
|
||||
}
|
||||
c.handleIndex(msg)
|
||||
c.state = stateIdxRcvd
|
||||
state = stateReady
|
||||
|
||||
case messageTypeIndexUpdate:
|
||||
if c.state < stateIdxRcvd {
|
||||
return fmt.Errorf("protocol error: index update message in state %d", c.state)
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: index update message in state %d", state)
|
||||
}
|
||||
c.handleIndexUpdate(msg)
|
||||
state = stateReady
|
||||
}
|
||||
|
||||
case RequestMessage:
|
||||
if c.state < stateIdxRcvd {
|
||||
return fmt.Errorf("protocol error: request message in state %d", c.state)
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: request message in state %d", state)
|
||||
}
|
||||
// Requests are handled asynchronously
|
||||
go c.handleRequest(hdr.msgID, msg)
|
||||
|
||||
case ResponseMessage:
|
||||
if c.state < stateIdxRcvd {
|
||||
return fmt.Errorf("protocol error: response message in state %d", c.state)
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: response message in state %d", state)
|
||||
}
|
||||
c.handleResponse(hdr.msgID, msg)
|
||||
|
||||
case pingMessage:
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: ping message in state %d", state)
|
||||
}
|
||||
c.send(hdr.msgID, messageTypePong, pongMessage{})
|
||||
|
||||
case pongMessage:
|
||||
c.handlePong(hdr.msgID)
|
||||
|
||||
case ClusterConfigMessage:
|
||||
if c.state != stateInitial {
|
||||
return fmt.Errorf("protocol error: cluster config message in state %d", c.state)
|
||||
if state != stateReady {
|
||||
return fmt.Errorf("protocol error: pong message in state %d", state)
|
||||
}
|
||||
go c.receiver.ClusterConfig(c.id, msg)
|
||||
c.state = stateCCRcvd
|
||||
c.handlePong(hdr.msgID)
|
||||
|
||||
case CloseMessage:
|
||||
return errors.New(msg.Reason)
|
||||
@@ -679,17 +684,17 @@ func (c *rawConnection) idGenerator() {
|
||||
|
||||
func (c *rawConnection) pingerLoop() {
|
||||
var rc = make(chan bool, 1)
|
||||
ticker := time.Tick(pingIdleTime / 2)
|
||||
ticker := time.Tick(PingIdleTime / 2)
|
||||
for {
|
||||
select {
|
||||
case <-ticker:
|
||||
if d := time.Since(c.cr.Last()); d < pingIdleTime {
|
||||
if d := time.Since(c.cr.Last()); d < PingIdleTime {
|
||||
if debug {
|
||||
l.Debugln(c.id, "ping skipped after rd", d)
|
||||
}
|
||||
continue
|
||||
}
|
||||
if d := time.Since(c.cw.Last()); d < pingIdleTime {
|
||||
if d := time.Since(c.cw.Last()); d < PingIdleTime {
|
||||
if debug {
|
||||
l.Debugln(c.id, "ping skipped after wr", d)
|
||||
}
|
||||
@@ -709,7 +714,7 @@ func (c *rawConnection) pingerLoop() {
|
||||
if !ok {
|
||||
c.close(fmt.Errorf("ping failure"))
|
||||
}
|
||||
case <-time.After(pingTimeout):
|
||||
case <-time.After(PingTimeout):
|
||||
c.close(fmt.Errorf("ping timeout"))
|
||||
case <-c.closed:
|
||||
return
|
||||
|
||||
30
Godeps/_workspace/src/github.com/syncthing/protocol/protocol_test.go
generated
vendored
30
Godeps/_workspace/src/github.com/syncthing/protocol/protocol_test.go
generated
vendored
@@ -67,8 +67,10 @@ func TestPing(t *testing.T) {
|
||||
ar, aw := io.Pipe()
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, nil, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
c1 := NewConnection(c1ID, br, aw, nil, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
c0 := NewConnection(c0ID, ar, bw, newTestModel(), "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
c1 := NewConnection(c1ID, br, aw, newTestModel(), "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
c0.ClusterConfig(ClusterConfigMessage{})
|
||||
c1.ClusterConfig(ClusterConfigMessage{})
|
||||
|
||||
if ok := c0.ping(); !ok {
|
||||
t.Error("c0 ping failed")
|
||||
@@ -81,8 +83,8 @@ func TestPing(t *testing.T) {
|
||||
func TestPingErr(t *testing.T) {
|
||||
e := errors.New("something broke")
|
||||
|
||||
for i := 0; i < 16; i++ {
|
||||
for j := 0; j < 16; j++ {
|
||||
for i := 0; i < 32; i++ {
|
||||
for j := 0; j < 32; j++ {
|
||||
m0 := newTestModel()
|
||||
m1 := newTestModel()
|
||||
|
||||
@@ -92,12 +94,16 @@ func TestPingErr(t *testing.T) {
|
||||
ebw := &ErrPipe{PipeWriter: *bw, max: j, err: e}
|
||||
|
||||
c0 := NewConnection(c0ID, ar, ebw, m0, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
NewConnection(c1ID, br, eaw, m1, "name", CompressAlways)
|
||||
c1 := NewConnection(c1ID, br, eaw, m1, "name", CompressAlways)
|
||||
c0.ClusterConfig(ClusterConfigMessage{})
|
||||
c1.ClusterConfig(ClusterConfigMessage{})
|
||||
|
||||
res := c0.ping()
|
||||
if (i < 8 || j < 8) && res {
|
||||
// This should have resulted in failure, as there is no way an empty ClusterConfig plus a Ping message fits in eight bytes.
|
||||
t.Errorf("Unexpected ping success; i=%d, j=%d", i, j)
|
||||
} else if (i >= 12 && j >= 12) && !res {
|
||||
} else if (i >= 28 && j >= 28) && !res {
|
||||
// This should have worked though, as 28 bytes is plenty for both.
|
||||
t.Errorf("Unexpected ping fail; i=%d, j=%d", i, j)
|
||||
}
|
||||
}
|
||||
@@ -168,7 +174,9 @@ func TestVersionErr(t *testing.T) {
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c0.ClusterConfig(ClusterConfigMessage{})
|
||||
c1.ClusterConfig(ClusterConfigMessage{})
|
||||
|
||||
w := xdr.NewWriter(c0.cw)
|
||||
w.WriteUint32(encodeHeader(header{
|
||||
@@ -191,7 +199,9 @@ func TestTypeErr(t *testing.T) {
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c0.ClusterConfig(ClusterConfigMessage{})
|
||||
c1.ClusterConfig(ClusterConfigMessage{})
|
||||
|
||||
w := xdr.NewWriter(c0.cw)
|
||||
w.WriteUint32(encodeHeader(header{
|
||||
@@ -214,7 +224,9 @@ func TestClose(t *testing.T) {
|
||||
br, bw := io.Pipe()
|
||||
|
||||
c0 := NewConnection(c0ID, ar, bw, m0, "name", CompressAlways).(wireFormatConnection).next.(*rawConnection)
|
||||
NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c1 := NewConnection(c1ID, br, aw, m1, "name", CompressAlways)
|
||||
c0.ClusterConfig(ClusterConfigMessage{})
|
||||
c1.ClusterConfig(ClusterConfigMessage{})
|
||||
|
||||
c0.close(nil)
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ var (
|
||||
)
|
||||
|
||||
type apiSvc struct {
|
||||
id protocol.DeviceID
|
||||
cfg config.GUIConfiguration
|
||||
assetDir string
|
||||
model *model.Model
|
||||
@@ -62,8 +63,9 @@ type apiSvc struct {
|
||||
eventSub *events.BufferedSubscription
|
||||
}
|
||||
|
||||
func newAPISvc(cfg config.GUIConfiguration, assetDir string, m *model.Model, eventSub *events.BufferedSubscription) (*apiSvc, error) {
|
||||
func newAPISvc(id protocol.DeviceID, cfg config.GUIConfiguration, assetDir string, m *model.Model, eventSub *events.BufferedSubscription) (*apiSvc, error) {
|
||||
svc := &apiSvc{
|
||||
id: id,
|
||||
cfg: cfg,
|
||||
assetDir: assetDir,
|
||||
model: m,
|
||||
@@ -188,14 +190,14 @@ func (s *apiSvc) Serve() {
|
||||
|
||||
// Wrap everything in CSRF protection. The /rest prefix should be
|
||||
// protected, other requests will grant cookies.
|
||||
handler := csrfMiddleware("/rest", s.cfg.APIKey, mux)
|
||||
handler := csrfMiddleware(s.id.String()[:5], "/rest", s.cfg.APIKey, mux)
|
||||
|
||||
// Add our version as a header to responses
|
||||
handler = withVersionMiddleware(handler)
|
||||
// Add our version and ID as a header to responses
|
||||
handler = withDetailsMiddleware(s.id, handler)
|
||||
|
||||
// Wrap everything in basic auth, if user/password is set.
|
||||
if len(s.cfg.User) > 0 && len(s.cfg.Password) > 0 {
|
||||
handler = basicAuthAndSessionMiddleware(s.cfg, handler)
|
||||
handler = basicAuthAndSessionMiddleware("sessionid-"+s.id.String()[:5], s.cfg, handler)
|
||||
}
|
||||
|
||||
// Redirect to HTTPS if we are supposed to
|
||||
@@ -334,9 +336,10 @@ func noCacheMiddleware(h http.Handler) http.Handler {
|
||||
})
|
||||
}
|
||||
|
||||
func withVersionMiddleware(h http.Handler) http.Handler {
|
||||
func withDetailsMiddleware(id protocol.DeviceID, h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("X-Syncthing-Version", Version)
|
||||
w.Header().Set("X-Syncthing-ID", id.String())
|
||||
h.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
@@ -425,7 +428,10 @@ func folderSummary(m *model.Model, folder string) map[string]interface{} {
|
||||
res["error"] = err.Error()
|
||||
}
|
||||
|
||||
res["version"] = m.CurrentLocalVersion(folder) + m.RemoteLocalVersion(folder)
|
||||
lv, _ := m.CurrentLocalVersion(folder)
|
||||
rv, _ := m.RemoteLocalVersion(folder)
|
||||
|
||||
res["version"] = lv + rv
|
||||
|
||||
ignorePatterns, _, _ := m.GetIgnores(folder)
|
||||
res["ignorePatterns"] = false
|
||||
@@ -570,26 +576,26 @@ func (s *apiSvc) postSystemRestart(w http.ResponseWriter, r *http.Request) {
|
||||
func (s *apiSvc) postSystemReset(w http.ResponseWriter, r *http.Request) {
|
||||
var qs = r.URL.Query()
|
||||
folder := qs.Get("folder")
|
||||
var err error
|
||||
if len(folder) == 0 {
|
||||
for folder := range cfg.Folders() {
|
||||
err = s.model.ResetFolder(folder)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
|
||||
if len(folder) > 0 {
|
||||
if _, ok := cfg.Folders()[folder]; !ok {
|
||||
http.Error(w, "Invalid folder ID", 500)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
err = s.model.ResetFolder(folder)
|
||||
}
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
}
|
||||
|
||||
if len(folder) == 0 {
|
||||
// Reset all folders.
|
||||
for folder := range cfg.Folders() {
|
||||
s.model.ResetFolder(folder)
|
||||
}
|
||||
s.flushResponse(`{"ok": "resetting database"}`, w)
|
||||
} else {
|
||||
// Reset a specific folder, assuming it's supposed to exist.
|
||||
s.model.ResetFolder(folder)
|
||||
s.flushResponse(`{"ok": "resetting folder `+folder+`"}`, w)
|
||||
}
|
||||
|
||||
go restart()
|
||||
}
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ var (
|
||||
sessionsMut = sync.NewMutex()
|
||||
)
|
||||
|
||||
func basicAuthAndSessionMiddleware(cfg config.GUIConfiguration, next http.Handler) http.Handler {
|
||||
func basicAuthAndSessionMiddleware(cookieName string, cfg config.GUIConfiguration, next http.Handler) http.Handler {
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if cfg.APIKey != "" && r.Header.Get("X-API-Key") == cfg.APIKey {
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
cookie, err := r.Cookie("sessionid")
|
||||
cookie, err := r.Cookie(cookieName)
|
||||
if err == nil && cookie != nil {
|
||||
sessionsMut.Lock()
|
||||
_, ok := sessions[cookie.Value]
|
||||
@@ -86,7 +87,7 @@ func basicAuthAndSessionMiddleware(cfg config.GUIConfiguration, next http.Handle
|
||||
sessions[sessionid] = true
|
||||
sessionsMut.Unlock()
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "sessionid",
|
||||
Name: cookieName,
|
||||
Value: sessionid,
|
||||
MaxAge: 0,
|
||||
})
|
||||
|
||||
@@ -24,7 +24,7 @@ var csrfMut = sync.NewMutex()
|
||||
// Check for CSRF token on /rest/ URLs. If a correct one is not given, reject
|
||||
// the request with 403. For / and /index.html, set a new CSRF cookie if none
|
||||
// is currently set.
|
||||
func csrfMiddleware(prefix, apiKey string, next http.Handler) http.Handler {
|
||||
func csrfMiddleware(unique, prefix, apiKey string, next http.Handler) http.Handler {
|
||||
loadCsrfTokens()
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// Allow requests carrying a valid API key
|
||||
@@ -35,10 +35,10 @@ func csrfMiddleware(prefix, apiKey string, next http.Handler) http.Handler {
|
||||
|
||||
// Allow requests for the front page, and set a CSRF cookie if there isn't already a valid one.
|
||||
if !strings.HasPrefix(r.URL.Path, prefix) {
|
||||
cookie, err := r.Cookie("CSRF-Token")
|
||||
cookie, err := r.Cookie("CSRF-Token-" + unique)
|
||||
if err != nil || !validCsrfToken(cookie.Value) {
|
||||
cookie = &http.Cookie{
|
||||
Name: "CSRF-Token",
|
||||
Name: "CSRF-Token-" + unique,
|
||||
Value: newCsrfToken(),
|
||||
}
|
||||
http.SetCookie(w, cookie)
|
||||
@@ -54,7 +54,7 @@ func csrfMiddleware(prefix, apiKey string, next http.Handler) http.Handler {
|
||||
}
|
||||
|
||||
// Verify the CSRF token
|
||||
token := r.Header.Get("X-CSRF-Token")
|
||||
token := r.Header.Get("X-CSRF-Token-" + unique)
|
||||
if !validCsrfToken(token) {
|
||||
http.Error(w, "CSRF Error", 403)
|
||||
return
|
||||
|
||||
@@ -565,6 +565,9 @@ func syncthingMain() {
|
||||
symlinks.Supported = false
|
||||
}
|
||||
|
||||
protocol.PingTimeout = time.Duration(opts.PingTimeoutS) * time.Second
|
||||
protocol.PingIdleTime = time.Duration(opts.PingIdleTimeS) * time.Second
|
||||
|
||||
if opts.MaxSendKbps > 0 {
|
||||
writeRateLimit = ratelimit.NewBucketWithRate(float64(1000*opts.MaxSendKbps), int64(5*1000*opts.MaxSendKbps))
|
||||
}
|
||||
@@ -808,7 +811,7 @@ func setupGUI(mainSvc *suture.Supervisor, cfg *config.Wrapper, m *model.Model, a
|
||||
|
||||
urlShow := fmt.Sprintf("%s://%s/", proto, net.JoinHostPort(hostShow, strconv.Itoa(addr.Port)))
|
||||
l.Infoln("Starting web GUI on", urlShow)
|
||||
api, err := newAPISvc(guiCfg, guiAssets, m, apiSub)
|
||||
api, err := newAPISvc(myID, guiCfg, guiAssets, m, apiSub)
|
||||
if err != nil {
|
||||
l.Fatalln("Cannot start GUI:", err)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Копиран от оригинала",
|
||||
"Copyright © 2015 the following Contributors:": "Правата запазени © 2015 Сътрудници:",
|
||||
"Delete": "Изтрий",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Изтрито",
|
||||
"Device ID": "Идентификатор на устройство",
|
||||
"Device Identification": "Идентификация на устройство",
|
||||
"Device Name": "Име на устройство",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "По-късно",
|
||||
"Local Discovery": "Локално Откриване",
|
||||
"Local State": "Локално състояние",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Локално Състояние (Общо)",
|
||||
"Major Upgrade": "Основно Обновяване",
|
||||
"Maximum Age": "Максимална Възраст",
|
||||
"Metadata Only": "Само мета информация",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Споделянето прекратено",
|
||||
"Unused": "Неизползван",
|
||||
"Up to Date": "Актуален",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Обновено",
|
||||
"Upgrade": "Обнови",
|
||||
"Upgrade To {%version%}": "Обновен До {{version}}",
|
||||
"Upgrading": "Обновяване",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"A negative number of days doesn't make sense.": "A negative number of days doesn't make sense.",
|
||||
"A negative number of days doesn't make sense.": "Un nombre negatiu de dies no té sentit.",
|
||||
"A new major version may not be compatible with previous versions.": "Una nova versión amb canvis importants pot no ser compatible amb versions prèvies.",
|
||||
"API Key": "Clau API",
|
||||
"About": "Sobre",
|
||||
"Actions": "Actions",
|
||||
"Actions": "Accions",
|
||||
"Add": "Afegir",
|
||||
"Add Device": "Afegir dispositiu",
|
||||
"Add Folder": "Afegir carpeta",
|
||||
@@ -20,7 +20,7 @@
|
||||
"Bugs": "Errors (Bugs)",
|
||||
"CPU Utilization": "Utilització de la CPU",
|
||||
"Changelog": "Registre de canvis",
|
||||
"Clean out after": "Clean out after",
|
||||
"Clean out after": "Netejar després de",
|
||||
"Close": "Tancar",
|
||||
"Command": "Comando",
|
||||
"Comment, when used at the start of a line": "Comentar, quant s'utilitza al principi d'una línia",
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiat de l'original",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 els següents Col·laboradors:",
|
||||
"Delete": "Esborrar",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Esborrat",
|
||||
"Device ID": "ID del dispositiu",
|
||||
"Device Identification": "Identificació del dispositiu",
|
||||
"Device Name": "Nom del dispositiu",
|
||||
@@ -53,7 +53,7 @@
|
||||
"File Pull Order": "Ordre de fitxers del pull",
|
||||
"File Versioning": "Versionat de fitxer",
|
||||
"File permission bits are ignored when looking for changes. Use on FAT file systems.": "Els bits de permís del fitxer són ignorats quant es busquen els canvis. Utilitzar en sistemes de fitxers FAT.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Files are moved to .stversions folder when replaced or deleted by Syncthing.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Els arxius es menejen a la carpeta .stversions quant són substituïts o esborrats per Syncthing.",
|
||||
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by Syncthing.": "Els fitxers són canviats a versions amb indicació de data en una carpeta \".stversions\" quant són reemplaçats o esborrats per Syncthing.",
|
||||
"Files are protected from changes made on other devices, but changes made on this device will be sent to the rest of the cluster.": "Els fitxers són protegits dels canvis fets en altres dispositius, però els canvis fets en aquest dispositiu seràn enviats a la resta del grup (cluster).",
|
||||
"Folder ID": "ID de carpeta",
|
||||
@@ -67,7 +67,7 @@
|
||||
"Global Discovery": "Descobriment global",
|
||||
"Global Discovery Server": "Servidor de descobriment global",
|
||||
"Global State": "Estat global",
|
||||
"Help": "Help",
|
||||
"Help": "Ajuda",
|
||||
"Ignore": "Ignorar",
|
||||
"Ignore Patterns": "Patrons a ignorar",
|
||||
"Ignore Permissions": "Permisos a ignorar",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Més tard",
|
||||
"Local Discovery": "Descobriment local",
|
||||
"Local State": "Estat local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Estat Local (Total)",
|
||||
"Major Upgrade": "Actualització important",
|
||||
"Maximum Age": "Edat màxima",
|
||||
"Metadata Only": "Sols metadades",
|
||||
@@ -165,19 +165,19 @@
|
||||
"The following intervals are used: for the first hour a version is kept every 30 seconds, for the first day a version is kept every hour, for the first 30 days a version is kept every day, until the maximum age a version is kept every week.": "S'utilitzen els següents intervals: per a la primera hora es guarda una versió cada 30 segons, per al primer dia es guarda una versió cada hora, per als primers 30 dies es guarda una versió diaria, fins l'edat màxima es guarda una versió cada setmana.",
|
||||
"The maximum age must be a number and cannot be blank.": "L'edat màxima deu ser un nombre i no pot estar buida.",
|
||||
"The maximum time to keep a version (in days, set to 0 to keep versions forever).": "El temps màxim per a guardar una versió (en dies, ficar 0 per a guardar les versions per a sempre).",
|
||||
"The number of days must be a number and cannot be blank.": "The number of days must be a number and cannot be blank.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "The number of days to keep files in the trash can. Zero means forever.",
|
||||
"The number of days must be a number and cannot be blank.": "El nombre de dies deu ser un nombre i no pot estar en blanc.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "El nombre de dies per a mantindre els arxius a la paperera. Cero vol dir \"per a sempre\".",
|
||||
"The number of old versions to keep, per file.": "El nombre de versions antigues per a guardar, per cada fitxer.",
|
||||
"The number of versions must be a number and cannot be blank.": "El nombre de versions deu ser un nombre i no pot estar buit.",
|
||||
"The path cannot be blank.": "La ruta no pot estar buida.",
|
||||
"The rescan interval must be a non-negative number of seconds.": "L'interval de reescaneig deu ser un nombre positiu de segons.",
|
||||
"This is a major version upgrade.": "Aquesta és una actualització important de la versió.",
|
||||
"Trash Can File Versioning": "Trash Can File Versioning",
|
||||
"Trash Can File Versioning": "Versionat d'arxius de la paperera",
|
||||
"Unknown": "Desconegut",
|
||||
"Unshared": "No compartit",
|
||||
"Unused": "No utilitzat",
|
||||
"Up to Date": "Actualitzat",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Actualitzat",
|
||||
"Upgrade": "Actualitzar",
|
||||
"Upgrade To {%version%}": "Actualitzar a {{version}}",
|
||||
"Upgrading": "Actualitzant",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Zkopírováno z originálu",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 následující přispěvatelé:",
|
||||
"Delete": "Smazat",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Smazáno",
|
||||
"Device ID": "ID přístroje",
|
||||
"Device Identification": "Identifikace přístroje",
|
||||
"Device Name": "Jméno přístroje",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Později",
|
||||
"Local Discovery": "Místní oznamování",
|
||||
"Local State": "Místní status",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Místní status (Celkem)",
|
||||
"Major Upgrade": "Důležitá aktualizace",
|
||||
"Maximum Age": "Maximální časový limit",
|
||||
"Metadata Only": "Pouze metadata",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Nesdílený",
|
||||
"Unused": "Nepoužitý",
|
||||
"Up to Date": "Aktuální",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Aktualizováno",
|
||||
"Upgrade": "Aktualizace",
|
||||
"Upgrade To {%version%}": "Aktualizovat na {{version}}",
|
||||
"Upgrading": "Aktualizuji",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Vom Original kopiert",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 die folgenden Unterstützer:",
|
||||
"Delete": "Löschen",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "gelöscht",
|
||||
"Device ID": "Geräte ID",
|
||||
"Device Identification": "Gerät Identifikation",
|
||||
"Device Name": "Gerätename",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Später",
|
||||
"Local Discovery": "Lokale Gerätesuche",
|
||||
"Local State": "Lokaler Status",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Lokaler Status (total)",
|
||||
"Major Upgrade": "Hauptversionsupgrade",
|
||||
"Maximum Age": "Höchstalter",
|
||||
"Metadata Only": "Nur Metadaten",
|
||||
@@ -99,7 +99,7 @@
|
||||
"Oldest First": "Älteste zuerst",
|
||||
"Out Of Sync": "Nicht synchronisiert",
|
||||
"Out of Sync Items": "Nicht synchronisierte Objekte",
|
||||
"Outgoing Rate Limit (KiB/s)": "Ausgehendes Datenratelimit (KB/s)",
|
||||
"Outgoing Rate Limit (KiB/s)": "Limit Datenrate (ausgehend) (KB/s)",
|
||||
"Override Changes": "Änderungen überschreiben",
|
||||
"Path to the folder on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for": "Pfad zum Verzeichnis auf dem lokalen Rechner. Wird erzeugt, wenn es nicht existiert. Das Tilden-Zeichen (~) kann als Abkürzung benutzt werden für",
|
||||
"Path where versions should be stored (leave empty for the default .stversions folder in the folder).": "Pfad in dem die Versionen gespeichert werden sollen (ohne Angabe wird das Verzeichnis .stversions im Verzeichnis verwendet).",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Ungeteilt",
|
||||
"Unused": "Ungenutzt",
|
||||
"Up to Date": "Aktuell",
|
||||
"Updated": "Updated",
|
||||
"Updated": "aktualisiert",
|
||||
"Upgrade": "Upgrade",
|
||||
"Upgrade To {%version%}": "Update auf {{version}}",
|
||||
"Upgrading": "Wird aktualisiert",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"Bugs": "Bugs",
|
||||
"CPU Utilization": "Επιβάρυνση του επεξεργαστή",
|
||||
"Changelog": "Πληροφορίες εκδόσεων",
|
||||
"Clean out after": "Clean out after",
|
||||
"Clean out after": "Μετά από αυτό, εκκαθάρισε",
|
||||
"Close": "Τέλος",
|
||||
"Command": "Εντολή",
|
||||
"Comment, when used at the start of a line": "Σχόλιο, όταν χρησιμοποιείται στην αρχή μιας γραμμής",
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Έχει αντιγραφεί από το πρωτότυπο",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 από τους παρακάτω συνεισφορείς:",
|
||||
"Delete": "Διαγραφή",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Διαγραμμένα",
|
||||
"Device ID": "Ταυτότητα συσκευής",
|
||||
"Device Identification": "Ταυτότητα συσκευής",
|
||||
"Device Name": "Όνομα συσκευής",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Αργότερα",
|
||||
"Local Discovery": "Τοπική ανεύρεση",
|
||||
"Local State": "Τοπική κατάσταση",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Τοπική κατάσταση (συνολικά)",
|
||||
"Major Upgrade": "Σημαντική αναβάθμιση",
|
||||
"Maximum Age": "Μέγιστη ηλικία",
|
||||
"Metadata Only": "Μόνο μεταδεδομένα",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Δε μοιράζεται",
|
||||
"Unused": "Δε χρησιμοποιείται",
|
||||
"Up to Date": "Ενημερωμένος",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Ενημερωμένο",
|
||||
"Upgrade": "Αναβάθμιση",
|
||||
"Upgrade To {%version%}": "Αναβάθμιση στην έκδοση {{version}}",
|
||||
"Upgrading": "Αναβάθμιση",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"A negative number of days doesn't make sense.": "A negative number of days doesn't make sense.",
|
||||
"A negative number of days doesn't make sense.": "Un número negativo de días no tiene sentido.",
|
||||
"A new major version may not be compatible with previous versions.": "Una nueva versión con cambios importantes puede no ser compatible con versiones anteriores.",
|
||||
"API Key": "Clave del API",
|
||||
"About": "Acerca de",
|
||||
"Actions": "Actions",
|
||||
"Actions": "Acciones",
|
||||
"Add": "Añadir",
|
||||
"Add Device": "Añadir dispositivo",
|
||||
"Add Folder": "Añadir repositorio",
|
||||
@@ -20,7 +20,7 @@
|
||||
"Bugs": "Errores (bugs)",
|
||||
"CPU Utilization": "Uso de CPU",
|
||||
"Changelog": "Informe de cambios",
|
||||
"Clean out after": "Clean out after",
|
||||
"Clean out after": "Limpiar tras",
|
||||
"Close": "Cerrar",
|
||||
"Command": "Comando",
|
||||
"Comment, when used at the start of a line": "Comentar, cuando se usa al comienzo de una línea",
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiado del original",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 los siguientes Colaboradores:",
|
||||
"Delete": "Borrar",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Borrado",
|
||||
"Device ID": "ID del dispositivo",
|
||||
"Device Identification": "Identificación del dispositivo",
|
||||
"Device Name": "Nombre del dispositivo",
|
||||
@@ -53,7 +53,7 @@
|
||||
"File Pull Order": "Orden de ficheros del pull",
|
||||
"File Versioning": "Versionado de ficheros",
|
||||
"File permission bits are ignored when looking for changes. Use on FAT file systems.": "Los bits de permiso de ficheros son ignorados cuando se buscan cambios. Utilizar en sistemas de ficheros FAT.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Files are moved to .stversions folder when replaced or deleted by Syncthing.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Los archivos serán movidos a la carpeta .stversions cuando sean reemplazados o borrados por Syncthing.",
|
||||
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by Syncthing.": "Los ficheros son cambiados a versiones con indicación de fecha en una carpeta \".stversions\" cuando son reemplazados o borrados por Syncthing.",
|
||||
"Files are protected from changes made on other devices, but changes made on this device will be sent to the rest of the cluster.": "Los ficheros son protegidos por los cambios hechos en otros dispositivos, pero los cambios hechos en este dispositivo serán enviados al resto del grupo (cluster).",
|
||||
"Folder ID": "ID de carpeta",
|
||||
@@ -67,7 +67,7 @@
|
||||
"Global Discovery": "Descubrimiento global",
|
||||
"Global Discovery Server": "Servidor de descubrimiento global",
|
||||
"Global State": "Estado global",
|
||||
"Help": "Help",
|
||||
"Help": "Ayuda",
|
||||
"Ignore": "Ignorar",
|
||||
"Ignore Patterns": "Patrones a ignorar",
|
||||
"Ignore Permissions": "Permisos a ignorar",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Más tarde",
|
||||
"Local Discovery": "Descubrimiento local",
|
||||
"Local State": "Estado local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Estado Local (Total)",
|
||||
"Major Upgrade": "Actualización importante",
|
||||
"Maximum Age": "Edad máxima",
|
||||
"Metadata Only": "Sólo metadatos",
|
||||
@@ -165,19 +165,19 @@
|
||||
"The following intervals are used: for the first hour a version is kept every 30 seconds, for the first day a version is kept every hour, for the first 30 days a version is kept every day, until the maximum age a version is kept every week.": "Se utilizan los siguientes intervalos: para la primera hora se mantiene una versión cada 30 segundos, para el primer día se mantiene una versión cada hora, para los primeros 30 días se mantiene una versión diaria hasta la edad máxima de una semana.",
|
||||
"The maximum age must be a number and cannot be blank.": "La edad máxima debe ser un número y no puede estar vacía.",
|
||||
"The maximum time to keep a version (in days, set to 0 to keep versions forever).": "El tiempo máximo para mantener una versión en días (introducir 0 para mantener las versiones indefinidamente).",
|
||||
"The number of days must be a number and cannot be blank.": "The number of days must be a number and cannot be blank.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "The number of days to keep files in the trash can. Zero means forever.",
|
||||
"The number of days must be a number and cannot be blank.": "El número de días debe ser un número y no puede estar en blanco.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "El número de días para mantener los archivos en la papelera. Cero significa \"para siempre\".",
|
||||
"The number of old versions to keep, per file.": "El número de versiones a antiguas a mantener para cada fichero.",
|
||||
"The number of versions must be a number and cannot be blank.": "El número de versiones debe ser un número y no puede estar vacío.",
|
||||
"The path cannot be blank.": "La ruta no puede estar vacía.",
|
||||
"The rescan interval must be a non-negative number of seconds.": "El intervalo de actualización debe ser un número positivo de segundos.",
|
||||
"This is a major version upgrade.": "Hay una actualización importante.",
|
||||
"Trash Can File Versioning": "Trash Can File Versioning",
|
||||
"Trash Can File Versioning": "Versionado de archivos de la papelera",
|
||||
"Unknown": "Desconocido",
|
||||
"Unshared": "No compartido",
|
||||
"Unused": "No usado",
|
||||
"Up to Date": "Actualizado",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Actualizado",
|
||||
"Upgrade": "Actualizar",
|
||||
"Upgrade To {%version%}": "Actualizar a {{version}}",
|
||||
"Upgrading": "Actualizando",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiado del original",
|
||||
"Copyright © 2015 the following Contributors:": "Derechos de autor © 2015 los siguientes colaboradores:",
|
||||
"Delete": "Suprimir",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Suprimido",
|
||||
"Device ID": "ID del dispositivo",
|
||||
"Device Identification": "Identificación del dispositivo",
|
||||
"Device Name": "Nombre del dispositivo",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Más tarde",
|
||||
"Local Discovery": "Búsqueda en red local",
|
||||
"Local State": "Estado local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Estado local (total)",
|
||||
"Major Upgrade": "Actualización mayor",
|
||||
"Maximum Age": "Edad máxima",
|
||||
"Metadata Only": "Sólo metadatos",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "No compartido",
|
||||
"Unused": "No utilizado",
|
||||
"Up to Date": "Actualizado",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Actualizado",
|
||||
"Upgrade": "Actualizar",
|
||||
"Upgrade To {%version%}": "Actualizar a {{version}}",
|
||||
"Upgrading": "Actualizando",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copié de l'original",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 Les contributeurs suivants:",
|
||||
"Delete": "Supprimer",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Supprimé",
|
||||
"Device ID": "ID du périphérique",
|
||||
"Device Identification": "Identification de l'appareil",
|
||||
"Device Name": "Nom du périphérique",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Plus tard",
|
||||
"Local Discovery": "Recherche locale",
|
||||
"Local State": "État local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Etat local (Total)",
|
||||
"Major Upgrade": "Mise à jour majeure",
|
||||
"Maximum Age": "Ancienneté maximum",
|
||||
"Metadata Only": "Métadonnées uniquement",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Non partagé",
|
||||
"Unused": "Non utilisé",
|
||||
"Up to Date": "Synchronisé",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Mis à jour",
|
||||
"Upgrade": "Mise à jour",
|
||||
"Upgrade To {%version%}": "Mettre à jour vers {{version}}",
|
||||
"Upgrading": "Mise à jour de Syncthing",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"A negative number of days doesn't make sense.": "A negative number of days doesn't make sense.",
|
||||
"A negative number of days doesn't make sense.": "Un numero di giorni negativo non ha alcun senso.",
|
||||
"A new major version may not be compatible with previous versions.": "Una nuova versione principale potrebbe non essere compatibile con le versioni precedenti.",
|
||||
"API Key": "Chiave API",
|
||||
"About": "Informazioni",
|
||||
@@ -20,7 +20,7 @@
|
||||
"Bugs": "Bug",
|
||||
"CPU Utilization": "Utilizzo CPU",
|
||||
"Changelog": "Changelog",
|
||||
"Clean out after": "Clean out after",
|
||||
"Clean out after": "Svuota dopo",
|
||||
"Close": "Chiudi",
|
||||
"Command": "Comando",
|
||||
"Comment, when used at the start of a line": "Per commentare, va inserito all'inizio di una riga",
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiato dall'originale",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 i seguenti Collaboratori:",
|
||||
"Delete": "Elimina",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Cancellato",
|
||||
"Device ID": "ID Dispositivo",
|
||||
"Device Identification": "Identificazione Dispositivo",
|
||||
"Device Name": "Nome Dispositivo",
|
||||
@@ -53,7 +53,7 @@
|
||||
"File Pull Order": "Ordine di prelievo dei file",
|
||||
"File Versioning": "Controllo Versione dei File",
|
||||
"File permission bits are ignored when looking for changes. Use on FAT file systems.": "Il software evita i bit dei permessi dei file durante il controllo delle modifiche. Utilizzato nei filesystem FAT.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Files are moved to .stversions folder when replaced or deleted by Syncthing.",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "I file sono spostati nella certella .stversions quando vengono sostituiti o cancellati da Syncthing.",
|
||||
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by Syncthing.": "I file sostituiti o eliminati da Syncthing vengono datati e spostati in una cartella .stversions.",
|
||||
"Files are protected from changes made on other devices, but changes made on this device will be sent to the rest of the cluster.": "I file sono protetti dalle modifiche effettuate negli altri dispositivi, ma le modifiche effettuate in questo dispositivo verranno inviate anche al resto del cluster.",
|
||||
"Folder ID": "ID Cartella",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Più Tardi",
|
||||
"Local Discovery": "Individuazione Locale",
|
||||
"Local State": "Stato Locale",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Stato Locale (Totale)",
|
||||
"Major Upgrade": "Aggiornamento principale",
|
||||
"Maximum Age": "Durata Massima",
|
||||
"Metadata Only": "Solo i Metadati",
|
||||
@@ -165,19 +165,19 @@
|
||||
"The following intervals are used: for the first hour a version is kept every 30 seconds, for the first day a version is kept every hour, for the first 30 days a version is kept every day, until the maximum age a version is kept every week.": "Vengono utilizzati i seguenti intervalli temporali: per la prima ora viene mantenuta una versione ogni 30 secondi, per il primo giorno viene mantenuta una versione ogni ora, per i primi 30 giorni viene mantenuta una versione al giorno, successivamente viene mantenuta una versione ogni settimana fino al periodo massimo impostato.",
|
||||
"The maximum age must be a number and cannot be blank.": "La durata massima dev'essere un numero e non può essere vuoto.",
|
||||
"The maximum time to keep a version (in days, set to 0 to keep versions forever).": "La durata massima di una versione (in giorni, imposta a 0 per mantenere le versioni per sempre).",
|
||||
"The number of days must be a number and cannot be blank.": "The number of days must be a number and cannot be blank.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "The number of days to keep files in the trash can. Zero means forever.",
|
||||
"The number of days must be a number and cannot be blank.": "Il numero di giorni deve essere un numero e non può essere vuoto.",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "Il numero di giorni per conservare i file nel cestino. Zero significa per sempre.",
|
||||
"The number of old versions to keep, per file.": "Il numero di vecchie versioni da mantenere, per file.",
|
||||
"The number of versions must be a number and cannot be blank.": "Il numero di versioni dev'essere un numero e non può essere vuoto.",
|
||||
"The path cannot be blank.": "Il percorso non può essere vuoto.",
|
||||
"The rescan interval must be a non-negative number of seconds.": "L'intervallo di scansione deve essere un numero superiore a zero secondi.",
|
||||
"This is a major version upgrade.": "Questo è un aggiornamento di versione principale",
|
||||
"Trash Can File Versioning": "Trash Can File Versioning",
|
||||
"Trash Can File Versioning": "Controllo Versione con Cestino",
|
||||
"Unknown": "Sconosciuto",
|
||||
"Unshared": "Non Condiviso",
|
||||
"Unused": "Non Utilizzato",
|
||||
"Up to Date": "Sincronizzato",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Aggiornato",
|
||||
"Upgrade": "Aggiornamento",
|
||||
"Upgrade To {%version%}": "Aggiorna alla {{version}}",
|
||||
"Upgrading": "Aggiornamento",
|
||||
|
||||
197
gui/assets/lang/lang-ja.json
Normal file
197
gui/assets/lang/lang-ja.json
Normal file
@@ -0,0 +1,197 @@
|
||||
{
|
||||
"A negative number of days doesn't make sense.": "負の日数は無理です。",
|
||||
"A new major version may not be compatible with previous versions.": "新しいメジャーバージョンは以前のバージョンと互換性がないかもしれません",
|
||||
"API Key": "APIキー",
|
||||
"About": "Syncthingについて",
|
||||
"Actions": "メニュー",
|
||||
"Add": "追加",
|
||||
"Add Device": "デバイスの追加",
|
||||
"Add Folder": "フォルダの追加",
|
||||
"Add new folder?": "フォルダを新規作成しますか?",
|
||||
"Address": "アドレス",
|
||||
"Addresses": "アドレス",
|
||||
"All Data": "全てのデータ",
|
||||
"Allow Anonymous Usage Reporting?": "匿名での利用者状況のレポートを許可しますか?",
|
||||
"Alphabetic": "ABC順",
|
||||
"An external command handles the versioning. It has to remove the file from the synced folder.": "バージョニングを行う外部コマンド。同期フォルダからファイルを削除する必要があります。",
|
||||
"Anonymous Usage Reporting": "匿名での利用者状況レポート",
|
||||
"Any devices configured on an introducer device will be added to this device as well.": "紹介デバイスで設定されたデバイスはここにも追加されます。",
|
||||
"Automatic upgrades": "自動アップデート",
|
||||
"Bugs": "バグ",
|
||||
"CPU Utilization": "CPU使用率",
|
||||
"Changelog": "更新履歴",
|
||||
"Clean out after": "後で掃除",
|
||||
"Close": "閉じる",
|
||||
"Command": "コマンド",
|
||||
"Comment, when used at the start of a line": "行頭で使用されるコメント",
|
||||
"Compression": "圧縮",
|
||||
"Connection Error": "接続エラー",
|
||||
"Copied from elsewhere": "他の所からコピーしました",
|
||||
"Copied from original": "オリジナルからコピーしました",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 以下の協力者たちの皆さん:",
|
||||
"Delete": "削除",
|
||||
"Deleted": "削除した",
|
||||
"Device ID": "デバイスID",
|
||||
"Device Identification": "デバイスの身分証明書",
|
||||
"Device Name": "デバイスの名前",
|
||||
"Device {%device%} ({%address%}) wants to connect. Add new device?": "デバイス{{device}} ({{address}})が接続しますか? ",
|
||||
"Devices": "デバイス",
|
||||
"Disconnected": "切断されました",
|
||||
"Documentation": "マニュアル",
|
||||
"Download Rate": "ダウンロード率",
|
||||
"Downloaded": "ダウンロード済",
|
||||
"Downloading": "ダウンロード中",
|
||||
"Edit": "編集",
|
||||
"Edit Device": "デバイスの変更",
|
||||
"Edit Folder": "フォルダーの変更",
|
||||
"Editing": "編集中",
|
||||
"Enable UPnP": "UPnPを許可する",
|
||||
"Enter comma separated \"ip:port\" addresses or \"dynamic\" to perform automatic discovery of the address.": "自動接続の場合は「dynamic」またはカンマ区切り「IPアドレス:ポート」を入力をしてください",
|
||||
"Enter ignore patterns, one per line.": "無視パターンを入力してください。一列一条件。",
|
||||
"Error": "エラー",
|
||||
"External File Versioning": "外部ファイルバージョニング",
|
||||
"File Pull Order": "ファイルの引き順番",
|
||||
"File Versioning": "ファイルバージョニング",
|
||||
"File permission bits are ignored when looking for changes. Use on FAT file systems.": "更新時、ファイルパーミッションの設定が無視されます。FATファイルシステムでご利用ください。",
|
||||
"Files are moved to .stversions folder when replaced or deleted by Syncthing.": "Syncthingによって移動や削除が行われるとファイルは.stversionsフォルダに移されます。",
|
||||
"Files are moved to date stamped versions in a .stversions folder when replaced or deleted by Syncthing.": "Syncthingによって移動や削除が行われるとファイルは.stversionsフォルダ内のタイムスタンプバージョンに移されます。",
|
||||
"Files are protected from changes made on other devices, but changes made on this device will be sent to the rest of the cluster.": "ファイルは他デバイスによる変更から保護されます。しかしこのデバイス上での変更は他のクラスタに送信されます。",
|
||||
"Folder ID": "フォルダID",
|
||||
"Folder Master": "フォルダのマスター",
|
||||
"Folder Path": "フォルダパス",
|
||||
"Folders": "フォルダ",
|
||||
"GUI Authentication Password": "GUI 認証パスワード",
|
||||
"GUI Authentication User": "GUI 認証ユーザー",
|
||||
"GUI Listen Addresses": "GUIリスンアドレス",
|
||||
"Generate": "生成",
|
||||
"Global Discovery": "グローバルディスカバリー",
|
||||
"Global Discovery Server": "グローバルディスカバリーサーバー",
|
||||
"Global State": "グローバル状態",
|
||||
"Help": "ヘルプ",
|
||||
"Ignore": "無視",
|
||||
"Ignore Patterns": "パターンを無視する",
|
||||
"Ignore Permissions": "アクセス許可を無視する",
|
||||
"Incoming Rate Limit (KiB/s)": "着信率制限(KiB/s)",
|
||||
"Introducer": "紹介デバイス",
|
||||
"Inversion of the given condition (i.e. do not exclude)": "条件の裏(と言うのは省かないで)",
|
||||
"Keep Versions": "バージョン保持",
|
||||
"Largest First": "大きい順",
|
||||
"Last File Received": "最後に受けとったファイル",
|
||||
"Last seen": "最後に見た",
|
||||
"Later": "後",
|
||||
"Local Discovery": "ローカルディスカバリー",
|
||||
"Local State": "ローカル状態",
|
||||
"Local State (Total)": "ローカル状態(総和)",
|
||||
"Major Upgrade": "メジャーアップグレード",
|
||||
"Maximum Age": "再",
|
||||
"Metadata Only": "メータデータだけ",
|
||||
"Move to top of queue": "最優先にする",
|
||||
"Multi level wildcard (matches multiple directory levels)": "広範なワイルドカード(複数のディレクトリに適用されます)",
|
||||
"Never": "決して",
|
||||
"New Device": "新規デバイス",
|
||||
"New Folder": "新規フォルダ",
|
||||
"Newest First": "新しい順",
|
||||
"No": "いいえ",
|
||||
"No File Versioning": "ファイルバージョニング不利用",
|
||||
"Notice": "通知",
|
||||
"OK": "OK",
|
||||
"Off": "オフ",
|
||||
"Oldest First": "古い順",
|
||||
"Out Of Sync": "シンク外",
|
||||
"Out of Sync Items": "シンクアイテム外",
|
||||
"Outgoing Rate Limit (KiB/s)": "発信率制限(KiB/s)",
|
||||
"Override Changes": "変更をオーバーライドする",
|
||||
"Path to the folder on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for": "ローカルコンピュータ上のフォルダパス。存在しない場合は作成されます。チルダ(~)をショートカットで利用することができます",
|
||||
"Path where versions should be stored (leave empty for the default .stversions folder in the folder).": "バージョンが保持されるパス(空欄の場合、デフォルトで.stversionsになります)",
|
||||
"Please consult the release notes before performing a major upgrade.": "メジャーアップグレードをする前にリリースノートを参考してください。",
|
||||
"Please wait": "お待ちください",
|
||||
"Preview": "プレビュー",
|
||||
"Preview Usage Report": "利用状況レポートのプレビュー",
|
||||
"Quick guide to supported patterns": "サポートされているパターンの簡易ガイド",
|
||||
"RAM Utilization": "メモリ利用率",
|
||||
"Random": "ランダム",
|
||||
"Release Notes": "リリースノート",
|
||||
"Rescan": "再スキャン",
|
||||
"Rescan All": "すべて再スキャン",
|
||||
"Rescan Interval": "再スキャンの間隔",
|
||||
"Restart": "再起動",
|
||||
"Restart Needed": "再起動が必要です",
|
||||
"Restarting": "再起動中",
|
||||
"Reused": "再使用されている",
|
||||
"Save": "保存",
|
||||
"Scanning": "スキャン中",
|
||||
"Select the devices to share this folder with.": "このフォルダをシェアするデバイスを選んでください。",
|
||||
"Select the folders to share with this device.": "このデバイスでシェアしたいフォルダを選んでください",
|
||||
"Settings": "設定",
|
||||
"Share": "共有",
|
||||
"Share Folder": "フォルダを共有する",
|
||||
"Share Folders With Device": "デバイスでフォルダをシェアする",
|
||||
"Share With Devices": "デバイスでシェアする",
|
||||
"Share this folder?": "このフォルダを共有しますか?",
|
||||
"Shared With": "シェアされている",
|
||||
"Short identifier for the folder. Must be the same on all cluster devices.": "このフォルダの短いID。全てのデバイス上で同じである必要があります。",
|
||||
"Show ID": "IDを表示",
|
||||
"Shown instead of Device ID in the cluster status. Will be advertised to other devices as an optional default name.": "クラスタステータスでデバイスIDの代わりに表示されます。他のデバイス上でもこれがデフォルトとして表示されます。",
|
||||
"Shown instead of Device ID in the cluster status. Will be updated to the name the device advertises if left empty.": "クラスタステータスでデバイスIDの代わりに表示されます。空欄の場合デバイスが要請する名前に更新されます。",
|
||||
"Shutdown": "シャットダウン",
|
||||
"Shutdown Complete": "シャットダウン完了",
|
||||
"Simple File Versioning": "簡易ファイルバージョニング",
|
||||
"Single level wildcard (matches within a directory only)": "ワイルドカード(一つのディレクトリだけに適用されます)",
|
||||
"Smallest First": "小さい順",
|
||||
"Source Code": "ソースコード",
|
||||
"Staggered File Versioning": "簡易ファイルバージョニング",
|
||||
"Start Browser": "ブラウザーを起動する",
|
||||
"Stopped": "止り",
|
||||
"Support": "サポート",
|
||||
"Sync Protocol Listen Addresses": "同期プロトコル待ち受けるアドレス",
|
||||
"Syncing": "同期中",
|
||||
"Syncthing has been shut down.": "Syncthingがシャットダウンしました。",
|
||||
"Syncthing includes the following software or portions thereof:": "Syncthingは以下のソフトウェアかその一部を内包しています:",
|
||||
"Syncthing is restarting.": "Syncthingが再起動しています",
|
||||
"Syncthing is upgrading.": "Syncthingがアップグレード中です",
|
||||
"Syncthing seems to be down, or there is a problem with your Internet connection. Retrying…": "Syncthingが落ちているか、インターネット接続に問題があります。リトライ中です…",
|
||||
"Syncthing seems to be experiencing a problem processing your request. Please refresh the page or restart Syncthing if the problem persists.": "リクエストの処理に問題があるようです。問題が継続する場合、ページを更新するかSyncthingを再起動してください。",
|
||||
"The aggregated statistics are publicly available at {%url%}.": "全体の統計は{{url}}でご覧いただけます。",
|
||||
"The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.": "設定がセーブされましたが、有効にはなっていません。設定を有効にするにはSyncthingを再起動する必要があります。",
|
||||
"The device ID cannot be blank.": "デバイスIDは空欄にできません",
|
||||
"The device ID to enter here can be found in the \"Edit > Show ID\" dialog on the other device. Spaces and dashes are optional (ignored).": "ここで入力したデバイスIDは他デバイス上の\"編集 > IDを表示\"で見ることができます。スペースとハイフンは無視されます。",
|
||||
"The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.": "暗号化された使用状況レポートが\b日ごとに送られます。これはプラットフォーム、フォルダの大きさ、アプリのバージョンを追跡するために利用されます。レポートのデータが変更された場合、このダイアログがまた表示されます。",
|
||||
"The entered device ID does not look valid. It should be a 52 or 56 character string consisting of letters and numbers, with spaces and dashes being optional.": "入力されたデバイスIDが正しくありません。52から56文字のアルファベットと数字かスペース、ハイフンの列である必要があります。",
|
||||
"The first command line parameter is the folder path and the second parameter is the relative path in the folder.": "第一コマンドパラメータはフォルダパス、第二パラメータはフォルダ内の相対パスです。",
|
||||
"The folder ID cannot be blank.": "フォルダIDは空欄にできません",
|
||||
"The folder ID must be a short identifier (64 characters or less) consisting of letters, numbers and the dot (.), dash (-) and underscode (_) characters only.": "フォルダID(64文字以内)は数字、ドット(.)、ハイフン(-)、アンダースコア(_)で構成されている必要があります。",
|
||||
"The folder ID must be unique.": "フォルダIDは固有である必要があります。",
|
||||
"The folder path cannot be blank.": "フォルダーパスは空欄にできません",
|
||||
"The following intervals are used: for the first hour a version is kept every 30 seconds, for the first day a version is kept every hour, for the first 30 days a version is kept every day, until the maximum age a version is kept every week.": "以下の間隔が使われます: 最初の一時間はバージョンは30秒ごとに保持、最初の一日は一時間ごとに、最初の30日は一日ごとに、最大寿命までは一週間ごとに。",
|
||||
"The maximum age must be a number and cannot be blank.": "最大日数は番号である必要があり、空欄ではいけません。",
|
||||
"The maximum time to keep a version (in days, set to 0 to keep versions forever).": "バージョンを保持する最大日数(0にすると永続的に保持します)",
|
||||
"The number of days must be a number and cannot be blank.": "日数は番号である必要があり、空欄ではいけません。",
|
||||
"The number of days to keep files in the trash can. Zero means forever.": "ゴミ箱にファイルを保持する日数。0だと永続的に保持します。",
|
||||
"The number of old versions to keep, per file.": "ファイルごとの保持する古いバージョンの数",
|
||||
"The number of versions must be a number and cannot be blank.": "バージョンの数は番号である必要があり、空欄ではいけません。",
|
||||
"The path cannot be blank.": "パスは空欄にできません",
|
||||
"The rescan interval must be a non-negative number of seconds.": "リスキャン間隔はマイナス秒ではいけません。",
|
||||
"This is a major version upgrade.": "メージャーアップグレードです。",
|
||||
"Trash Can File Versioning": "ゴミ箱のファイルバージョニング",
|
||||
"Unknown": "不明",
|
||||
"Unshared": "シェアされていない",
|
||||
"Unused": "使われていない",
|
||||
"Up to Date": "最新",
|
||||
"Updated": "更新済み",
|
||||
"Upgrade": "アップグレード",
|
||||
"Upgrade To {%version%}": "{{version}}にアップグレードする",
|
||||
"Upgrading": "アップグレード中",
|
||||
"Upload Rate": "アップロード率",
|
||||
"Uptime": "稼働時間",
|
||||
"Use HTTPS for GUI": "GUIにHTTPSを使う",
|
||||
"Version": "バージョン",
|
||||
"Versions Path": "バージョンパス",
|
||||
"Versions are automatically deleted if they are older than the maximum age or exceed the number of files allowed in an interval.": "バージョンは、最大寿命もしくは最大同時数を超えた場合、自動的に削除されます。",
|
||||
"When adding a new device, keep in mind that this device must be added on the other side too.": "新しいデバイスを加える際、そのデバイスにもこのデバイスを加える必要があることを留意してください。",
|
||||
"When adding a new folder, keep in mind that the Folder ID is used to tie folders together between devices. They are case sensitive and must match exactly between all devices.": "新しいフォルダを追加する際、フォルダIDはケースセンシティブで全てのデバイス上で完全に同じである必要があります。",
|
||||
"Yes": "はい",
|
||||
"You must keep at least one version.": "バージョン一つ少なくとも保持してください",
|
||||
"full documentation": "完全マニュアル",
|
||||
"items": "アイテム",
|
||||
"{%device%} wants to share folder \"{%folder%}\".": "{{device}}がフォルダ\"{{folder}}\"をシェアしがたっています。"
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Nukopijuota iš originalo",
|
||||
"Copyright © 2015 the following Contributors:": "Visos teisės saugomos © 2015 šių bendraautorių:",
|
||||
"Delete": "Trinti",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Ištrinta",
|
||||
"Device ID": "Įrenginio ID",
|
||||
"Device Identification": "Įrenginio identifikacija",
|
||||
"Device Name": "Įrenginio pavadinimas",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Vėliau",
|
||||
"Local Discovery": "Vietinis matomumas",
|
||||
"Local State": "Vietinė būsena",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Vietinė būsena (Bendrai)",
|
||||
"Major Upgrade": "Stambus atnaujinimas",
|
||||
"Maximum Age": "Maksimalus amžius",
|
||||
"Metadata Only": "Metaduomenims",
|
||||
@@ -172,12 +172,12 @@
|
||||
"The path cannot be blank.": "Kelias negali būti tuščias.",
|
||||
"The rescan interval must be a non-negative number of seconds.": "Nuskaitymo dažnis negali būti neigiamas skaičius.",
|
||||
"This is a major version upgrade.": "Tai yra stambus atnaujinimas.",
|
||||
"Trash Can File Versioning": "Šiukšliadėžės versiju valdymas",
|
||||
"Trash Can File Versioning": "Šiukšliadėžės versijų valdymas",
|
||||
"Unknown": "Nežinoma",
|
||||
"Unshared": "Nesidalinama",
|
||||
"Unused": "Nenaudojamas",
|
||||
"Up to Date": "Atnaujinta",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Atnaujinta",
|
||||
"Upgrade": "Atnaujinimas",
|
||||
"Upgrade To {%version%}": "Atnaujinti į {{version}}",
|
||||
"Upgrading": "Atnaujinama",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Kopiert fra original",
|
||||
"Copyright © 2015 the following Contributors:": "Kopirett © 2015 de følgende bidragsytere:",
|
||||
"Delete": "Slett",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Slettet",
|
||||
"Device ID": "Enhets ID",
|
||||
"Device Identification": "Enhetskjennemerke",
|
||||
"Device Name": "Navn På Enhet",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Senere",
|
||||
"Local Discovery": "Lokal Søking",
|
||||
"Local State": "Lokal Tilstand",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Lokal Tilstand (Total)",
|
||||
"Major Upgrade": "Hovedoppgradering",
|
||||
"Maximum Age": "Maksimal Levetid",
|
||||
"Metadata Only": "Kun metadata",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Ikke delt",
|
||||
"Unused": "Ikke i bruk",
|
||||
"Up to Date": "Oppdatert",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Oppdatert",
|
||||
"Upgrade": "Oppgradere",
|
||||
"Upgrade To {%version%}": "Oppgrader Til {{version}}",
|
||||
"Upgrading": "Oppgraderer",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiado do original",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015. Direitos reservados aos seguintes colaboradores:",
|
||||
"Delete": "Apagar",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Apagado",
|
||||
"Device ID": "ID do dispositivo",
|
||||
"Device Identification": "Identificação do dispositivo",
|
||||
"Device Name": "Nome do dispositivo",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Depois",
|
||||
"Local Discovery": "Descoberta local",
|
||||
"Local State": "Estado local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Estado local (total)",
|
||||
"Major Upgrade": "Atualização \"major\"",
|
||||
"Maximum Age": "Idade máxima",
|
||||
"Metadata Only": "Somente metadados",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Não compartilhada",
|
||||
"Unused": "Não utilizado",
|
||||
"Up to Date": "Sincronizada",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Atualizado",
|
||||
"Upgrade": "Atualização",
|
||||
"Upgrade To {%version%}": "Atualizar para {{version}}",
|
||||
"Upgrading": "Atualizando",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Copiado do original",
|
||||
"Copyright © 2015 the following Contributors:": "Copyright © 2015 os seguintes contribuidores:",
|
||||
"Delete": "Eliminar",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Eliminado",
|
||||
"Device ID": "ID do dispositivo",
|
||||
"Device Identification": "Identificação do dispositivo",
|
||||
"Device Name": "Nome do dispositivo",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Mais tarde",
|
||||
"Local Discovery": "Busca local",
|
||||
"Local State": "Estado local",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Estado local (total)",
|
||||
"Major Upgrade": "Actualização importante",
|
||||
"Maximum Age": "Idade máxima",
|
||||
"Metadata Only": "Metadados apenas",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Não partilhada",
|
||||
"Unused": "Não utilizado",
|
||||
"Up to Date": "Sincronizado",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Actualizado",
|
||||
"Upgrade": "Actualizar",
|
||||
"Upgrade To {%version%}": "Actualizar para {{version}}",
|
||||
"Upgrading": "Actualizando",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"Copied from original": "Скопировано с оригинала",
|
||||
"Copyright © 2015 the following Contributors:": "Все права защищены ©, 2015 участники:",
|
||||
"Delete": "Удалить",
|
||||
"Deleted": "Deleted",
|
||||
"Deleted": "Удалено",
|
||||
"Device ID": "ID устройства",
|
||||
"Device Identification": "Идентификация устройства",
|
||||
"Device Name": "Имя устройства",
|
||||
@@ -81,7 +81,7 @@
|
||||
"Later": "Потом",
|
||||
"Local Discovery": "Локальное обнаружение",
|
||||
"Local State": "Локальное состояние",
|
||||
"Local State (Total)": "Local State (Total)",
|
||||
"Local State (Total)": "Локально (всего)",
|
||||
"Major Upgrade": "Обновление основной версии",
|
||||
"Maximum Age": "Максимальный срок",
|
||||
"Metadata Only": "Только метаданные",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Unshared": "Необщедоступно",
|
||||
"Unused": "Не используется",
|
||||
"Up to Date": "Обновлено",
|
||||
"Updated": "Updated",
|
||||
"Updated": "Обновлено",
|
||||
"Upgrade": "Обновить",
|
||||
"Upgrade To {%version%}": "Обновить до {{version}}",
|
||||
"Upgrading": "Обновление",
|
||||
|
||||
@@ -1 +1 @@
|
||||
var langPrettyprint = {"bg":"Bulgarian","ca":"Catalan","ca@valencia":"Catalan (Valencian)","cs":"Czech","de":"German","el":"Greek","en":"English","en-GB":"English (United Kingdom)","es":"Spanish","es-ES":"Spanish (Spain)","fi":"Finnish","fr":"French","hu":"Hungarian","it":"Italian","ko-KR":"Korean (Korea)","lt":"Lithuanian","nb":"Norwegian Bokmål","nl":"Dutch","nn":"Norwegian Nynorsk","pl":"Polish","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)","ro-RO":"Romanian (Romania)","ru":"Russian","sv":"Swedish","tr":"Turkish","uk":"Ukrainian","zh-CN":"Chinese (China)","zh-TW":"Chinese (Taiwan)"}
|
||||
var langPrettyprint = {"bg":"Bulgarian","ca":"Catalan","ca@valencia":"Catalan (Valencian)","cs":"Czech","de":"German","el":"Greek","en":"English","en-GB":"English (United Kingdom)","es":"Spanish","es-ES":"Spanish (Spain)","fi":"Finnish","fr":"French","hu":"Hungarian","it":"Italian","ja":"Japanese","ko-KR":"Korean (Korea)","lt":"Lithuanian","nb":"Norwegian Bokmål","nl":"Dutch","nn":"Norwegian Nynorsk","pl":"Polish","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)","ro-RO":"Romanian (Romania)","ru":"Russian","sv":"Swedish","tr":"Turkish","uk":"Ukrainian","zh-CN":"Chinese (China)","zh-TW":"Chinese (Taiwan)"}
|
||||
|
||||
@@ -1 +1 @@
|
||||
var validLangs = ["bg","ca","ca@valencia","cs","de","el","en","en-GB","es","es-ES","fi","fr","hu","it","ko-KR","lt","nb","nl","nn","pl","pt-BR","pt-PT","ro-RO","ru","sv","tr","uk","zh-CN","zh-TW"]
|
||||
var validLangs = ["bg","ca","ca@valencia","cs","de","el","en","en-GB","es","es-ES","fi","fr","hu","it","ja","ko-KR","lt","nb","nl","nn","pl","pt-BR","pt-PT","ro-RO","ru","sv","tr","uk","zh-CN","zh-TW"]
|
||||
|
||||
@@ -17,10 +17,9 @@ var syncthing = angular.module('syncthing', [
|
||||
|
||||
var urlbase = 'rest';
|
||||
var guiVersion = null;
|
||||
var deviceId = null;
|
||||
|
||||
syncthing.config(function ($httpProvider, $translateProvider, LocaleServiceProvider) {
|
||||
$httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token';
|
||||
$httpProvider.defaults.xsrfCookieName = 'CSRF-Token';
|
||||
$httpProvider.interceptors.push(function () {
|
||||
return {
|
||||
response: function (response) {
|
||||
@@ -30,6 +29,14 @@ syncthing.config(function ($httpProvider, $translateProvider, LocaleServiceProvi
|
||||
} else if (guiVersion != responseVersion) {
|
||||
document.location.reload(true);
|
||||
}
|
||||
if (!deviceId) {
|
||||
deviceId = response.headers()['x-syncthing-id'];
|
||||
if (deviceId) {
|
||||
var deviceIdShort = deviceId.substring(0, 5);
|
||||
$httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token-' + deviceIdShort;
|
||||
$httpProvider.defaults.xsrfCookieName = 'CSRF-Token-' + deviceIdShort;
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,6 @@ package config
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"os"
|
||||
@@ -238,6 +237,8 @@ type OptionsConfiguration struct {
|
||||
SymlinksEnabled bool `xml:"symlinksEnabled" json:"symlinksEnabled" default:"true"`
|
||||
LimitBandwidthInLan bool `xml:"limitBandwidthInLan" json:"limitBandwidthInLan" default:"false"`
|
||||
DatabaseBlockCacheMiB int `xml:"databaseBlockCacheMiB" json:"databaseBlockCacheMiB" default:"0"`
|
||||
PingTimeoutS int `xml:"pingTimeoutS" json:"pingTimeoutS" default:"30"`
|
||||
PingIdleTimeS int `xml:"pingIdleTimeS" json:"pingIdleTimeS" default:"60"`
|
||||
}
|
||||
|
||||
func (orig OptionsConfiguration) Copy() OptionsConfiguration {
|
||||
@@ -310,7 +311,6 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
||||
|
||||
// Check for missing, bad or duplicate folder ID:s
|
||||
var seenFolders = map[string]*FolderConfiguration{}
|
||||
var uniqueCounter int
|
||||
for i := range cfg.Folders {
|
||||
folder := &cfg.Folders[i]
|
||||
|
||||
@@ -339,15 +339,8 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
||||
|
||||
if seen, ok := seenFolders[folder.ID]; ok {
|
||||
l.Warnf("Multiple folders with ID %q; disabling", folder.ID)
|
||||
|
||||
seen.Invalid = "duplicate folder ID"
|
||||
if seen.ID == folder.ID {
|
||||
uniqueCounter++
|
||||
seen.ID = fmt.Sprintf("%s~%d", folder.ID, uniqueCounter)
|
||||
}
|
||||
folder.Invalid = "duplicate folder ID"
|
||||
uniqueCounter++
|
||||
folder.ID = fmt.Sprintf("%s~%d", folder.ID, uniqueCounter)
|
||||
} else {
|
||||
seenFolders[folder.ID] = folder
|
||||
}
|
||||
@@ -587,7 +580,7 @@ func fillNilSlices(data interface{}) error {
|
||||
func uniqueStrings(ss []string) []string {
|
||||
var m = make(map[string]bool, len(ss))
|
||||
for _, s := range ss {
|
||||
m[s] = true
|
||||
m[strings.Trim(s, " ")] = true
|
||||
}
|
||||
|
||||
var us = make([]string, 0, len(m))
|
||||
|
||||
@@ -53,6 +53,8 @@ func TestDefaultValues(t *testing.T) {
|
||||
SymlinksEnabled: true,
|
||||
LimitBandwidthInLan: false,
|
||||
DatabaseBlockCacheMiB: 0,
|
||||
PingTimeoutS: 30,
|
||||
PingIdleTimeS: 60,
|
||||
}
|
||||
|
||||
cfg := New(device1)
|
||||
@@ -160,6 +162,8 @@ func TestOverriddenValues(t *testing.T) {
|
||||
SymlinksEnabled: false,
|
||||
LimitBandwidthInLan: true,
|
||||
DatabaseBlockCacheMiB: 42,
|
||||
PingTimeoutS: 60,
|
||||
PingIdleTimeS: 120,
|
||||
}
|
||||
|
||||
cfg, err := Load("testdata/overridenvalues.xml", device1)
|
||||
@@ -317,6 +321,29 @@ func TestIssue1262(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIssue1750(t *testing.T) {
|
||||
cfg, err := Load("testdata/issue-1750.xml", device4)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if cfg.Options().ListenAddress[0] != ":23000" {
|
||||
t.Errorf("%q != %q", cfg.Options().ListenAddress[0], ":23000")
|
||||
}
|
||||
|
||||
if cfg.Options().ListenAddress[1] != ":23001" {
|
||||
t.Errorf("%q != %q", cfg.Options().ListenAddress[1], ":23001")
|
||||
}
|
||||
|
||||
if cfg.Options().GlobalAnnServers[0] != "udp4://syncthing.nym.se:22026" {
|
||||
t.Errorf("%q != %q", cfg.Options().GlobalAnnServers[0], "udp4://syncthing.nym.se:22026")
|
||||
}
|
||||
|
||||
if cfg.Options().GlobalAnnServers[1] != "udp4://syncthing.nym.se:22027" {
|
||||
t.Errorf("%q != %q", cfg.Options().GlobalAnnServers[1], "udp4://syncthing.nym.se:22027")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWindowsPaths(t *testing.T) {
|
||||
if runtime.GOOS != "windows" {
|
||||
t.Skip("Not useful on non-Windows")
|
||||
|
||||
8
internal/config/testdata/issue-1750.xml
vendored
Normal file
8
internal/config/testdata/issue-1750.xml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<configuration version="9">
|
||||
<options>
|
||||
<listenAddress> :23000</listenAddress>
|
||||
<listenAddress> :23001 </listenAddress>
|
||||
<globalAnnounceServer> udp4://syncthing.nym.se:22026</globalAnnounceServer>
|
||||
<globalAnnounceServer> udp4://syncthing.nym.se:22027 </globalAnnounceServer>
|
||||
</options>
|
||||
</configuration>
|
||||
2
internal/config/testdata/overridenvalues.xml
vendored
2
internal/config/testdata/overridenvalues.xml
vendored
@@ -24,5 +24,7 @@
|
||||
<symlinksEnabled>false</symlinksEnabled>
|
||||
<limitBandwidthInLan>true</limitBandwidthInLan>
|
||||
<databaseBlockCacheMiB>42</databaseBlockCacheMiB>
|
||||
<pingTimeoutS>60</pingTimeoutS>
|
||||
<pingIdleTimeS>120</pingIdleTimeS>
|
||||
</options>
|
||||
</configuration>
|
||||
|
||||
@@ -55,6 +55,7 @@ type service interface {
|
||||
BringToFront(string)
|
||||
DelayScan(d time.Duration)
|
||||
IndexUpdated() // Remote index was updated notification
|
||||
Scan(subs []string) error
|
||||
|
||||
setState(state folderState)
|
||||
setError(err error)
|
||||
@@ -91,8 +92,7 @@ type Model struct {
|
||||
deviceVer map[protocol.DeviceID]string
|
||||
pmut sync.RWMutex // protects protoConn and rawConn
|
||||
|
||||
addedFolder bool
|
||||
started bool
|
||||
started bool
|
||||
|
||||
reqValidationCache map[string]time.Time // folder / file name => time when confirmed to exist
|
||||
rvmut sync.RWMutex // protects reqValidationCache
|
||||
@@ -1179,7 +1179,6 @@ func (m *Model) AddFolder(cfg config.FolderConfiguration) {
|
||||
_ = ignores.Load(filepath.Join(cfg.Path(), ".stignore")) // Ignore error, there might not be an .stignore
|
||||
m.folderIgnores[cfg.ID] = ignores
|
||||
|
||||
m.addedFolder = true
|
||||
m.fmut.Unlock()
|
||||
}
|
||||
|
||||
@@ -1226,6 +1225,21 @@ func (m *Model) ScanFolder(folder string) error {
|
||||
}
|
||||
|
||||
func (m *Model) ScanFolderSubs(folder string, subs []string) error {
|
||||
m.fmut.Lock()
|
||||
runner, ok := m.folderRunners[folder]
|
||||
m.fmut.Unlock()
|
||||
|
||||
// Folders are added to folderRunners only when they are started. We can't
|
||||
// scan them before they have started, so that's what we need to check for
|
||||
// here.
|
||||
if !ok {
|
||||
return errors.New("no such folder")
|
||||
}
|
||||
|
||||
return runner.Scan(subs)
|
||||
}
|
||||
|
||||
func (m *Model) internalScanFolderSubs(folder string, subs []string) error {
|
||||
for i, sub := range subs {
|
||||
sub = osutil.NativeFilename(sub)
|
||||
if p := filepath.Clean(filepath.Join(folder, sub)); !strings.HasPrefix(p, folder) {
|
||||
@@ -1540,23 +1554,23 @@ func (m *Model) Override(folder string) {
|
||||
// CurrentLocalVersion returns the change version for the given folder.
|
||||
// This is guaranteed to increment if the contents of the local folder has
|
||||
// changed.
|
||||
func (m *Model) CurrentLocalVersion(folder string) int64 {
|
||||
func (m *Model) CurrentLocalVersion(folder string) (int64, bool) {
|
||||
m.fmut.RLock()
|
||||
fs, ok := m.folderFiles[folder]
|
||||
m.fmut.RUnlock()
|
||||
if !ok {
|
||||
// The folder might not exist, since this can be called with a user
|
||||
// specified folder name from the REST interface.
|
||||
return 0
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return fs.LocalVersion(protocol.LocalDeviceID)
|
||||
return fs.LocalVersion(protocol.LocalDeviceID), true
|
||||
}
|
||||
|
||||
// RemoteLocalVersion returns the change version for the given folder, as
|
||||
// sent by remote peers. This is guaranteed to increment if the contents of
|
||||
// the remote or global folder has changed.
|
||||
func (m *Model) RemoteLocalVersion(folder string) int64 {
|
||||
func (m *Model) RemoteLocalVersion(folder string) (int64, bool) {
|
||||
m.fmut.RLock()
|
||||
defer m.fmut.RUnlock()
|
||||
|
||||
@@ -1564,7 +1578,7 @@ func (m *Model) RemoteLocalVersion(folder string) int64 {
|
||||
if !ok {
|
||||
// The folder might not exist, since this can be called with a user
|
||||
// specified folder name from the REST interface.
|
||||
return 0
|
||||
return 0, false
|
||||
}
|
||||
|
||||
var ver int64
|
||||
@@ -1572,7 +1586,7 @@ func (m *Model) RemoteLocalVersion(folder string) int64 {
|
||||
ver += fs.LocalVersion(n)
|
||||
}
|
||||
|
||||
return ver
|
||||
return ver, true
|
||||
}
|
||||
|
||||
func (m *Model) GlobalDirectoryTree(folder, prefix string, levels int, dirsonly bool) map[string]interface{} {
|
||||
@@ -1681,7 +1695,7 @@ func (m *Model) CheckFolderHealth(id string) error {
|
||||
}
|
||||
|
||||
fi, err := os.Stat(folder.Path())
|
||||
if m.CurrentLocalVersion(id) > 0 {
|
||||
if v, ok := m.CurrentLocalVersion(id); ok && v > 0 {
|
||||
// Safety check. If the cached index contains files but the
|
||||
// folder doesn't exist, we have a problem. We would assume
|
||||
// that all files have been deleted which might not be the case,
|
||||
@@ -1732,15 +1746,9 @@ func (m *Model) CheckFolderHealth(id string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *Model) ResetFolder(folder string) error {
|
||||
for _, f := range db.ListFolders(m.db) {
|
||||
if f == folder {
|
||||
l.Infof("Cleaning data for folder %q", folder)
|
||||
db.DropFolder(m.db, folder)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("Unknown folder %q", folder)
|
||||
func (m *Model) ResetFolder(folder string) {
|
||||
l.Infof("Cleaning data for folder %q", folder)
|
||||
db.DropFolder(m.db, folder)
|
||||
}
|
||||
|
||||
func (m *Model) String() string {
|
||||
|
||||
@@ -22,9 +22,15 @@ type roFolder struct {
|
||||
timer *time.Timer
|
||||
model *Model
|
||||
stop chan struct{}
|
||||
scanNow chan rescanRequest
|
||||
delayScan chan time.Duration
|
||||
}
|
||||
|
||||
type rescanRequest struct {
|
||||
subs []string
|
||||
err chan error
|
||||
}
|
||||
|
||||
func newROFolder(model *Model, folder string, interval time.Duration) *roFolder {
|
||||
return &roFolder{
|
||||
stateTracker: stateTracker{
|
||||
@@ -36,6 +42,7 @@ func newROFolder(model *Model, folder string, interval time.Duration) *roFolder
|
||||
timer: time.NewTimer(time.Millisecond),
|
||||
model: model,
|
||||
stop: make(chan struct{}),
|
||||
scanNow: make(chan rescanRequest),
|
||||
delayScan: make(chan time.Duration),
|
||||
}
|
||||
}
|
||||
@@ -76,7 +83,7 @@ func (s *roFolder) Serve() {
|
||||
l.Debugln(s, "rescan")
|
||||
}
|
||||
|
||||
if err := s.model.ScanFolder(s.folder); err != nil {
|
||||
if err := s.model.internalScanFolderSubs(s.folder, nil); err != nil {
|
||||
// Potentially sets the error twice, once in the scanner just
|
||||
// by doing a check, and once here, if the error returned is
|
||||
// the same one as returned by CheckFolderHealth, though
|
||||
@@ -92,11 +99,34 @@ func (s *roFolder) Serve() {
|
||||
}
|
||||
|
||||
if s.intv == 0 {
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
reschedule()
|
||||
|
||||
case req := <-s.scanNow:
|
||||
if err := s.model.CheckFolderHealth(s.folder); err != nil {
|
||||
l.Infoln("Skipping folder", s.folder, "scan due to folder error:", err)
|
||||
req.err <- err
|
||||
continue
|
||||
}
|
||||
|
||||
if debug {
|
||||
l.Debugln(s, "forced rescan")
|
||||
}
|
||||
|
||||
if err := s.model.internalScanFolderSubs(s.folder, req.subs); err != nil {
|
||||
// Potentially sets the error twice, once in the scanner just
|
||||
// by doing a check, and once here, if the error returned is
|
||||
// the same one as returned by CheckFolderHealth, though
|
||||
// duplicate set is handled by setError.
|
||||
s.setError(err)
|
||||
req.err <- err
|
||||
continue
|
||||
}
|
||||
|
||||
req.err <- nil
|
||||
|
||||
case next := <-s.delayScan:
|
||||
s.timer.Reset(next)
|
||||
}
|
||||
@@ -110,6 +140,15 @@ func (s *roFolder) Stop() {
|
||||
func (s *roFolder) IndexUpdated() {
|
||||
}
|
||||
|
||||
func (s *roFolder) Scan(subs []string) error {
|
||||
req := rescanRequest{
|
||||
subs: subs,
|
||||
err: make(chan error),
|
||||
}
|
||||
s.scanNow <- req
|
||||
return <-req.err
|
||||
}
|
||||
|
||||
func (s *roFolder) String() string {
|
||||
return fmt.Sprintf("roFolder/%s@%p", s.folder, s)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
const (
|
||||
pauseIntv = 60 * time.Second
|
||||
nextPullIntv = 10 * time.Second
|
||||
shortPullIntv = 5 * time.Second
|
||||
shortPullIntv = time.Second
|
||||
)
|
||||
|
||||
// A pullBlockState is passed to the puller routine for each block that needs
|
||||
@@ -90,6 +90,7 @@ type rwFolder struct {
|
||||
scanTimer *time.Timer
|
||||
pullTimer *time.Timer
|
||||
delayScan chan time.Duration
|
||||
scanNow chan rescanRequest
|
||||
remoteIndex chan struct{} // An index update was received, we should re-evaluate needs
|
||||
}
|
||||
|
||||
@@ -118,6 +119,7 @@ func newRWFolder(m *Model, shortID uint64, cfg config.FolderConfiguration) *rwFo
|
||||
pullTimer: time.NewTimer(shortPullIntv),
|
||||
scanTimer: time.NewTimer(time.Millisecond), // The first scan should be done immediately.
|
||||
delayScan: make(chan time.Duration),
|
||||
scanNow: make(chan rescanRequest),
|
||||
remoteIndex: make(chan struct{}, 1), // This needs to be 1-buffered so that we queue a notification if we're busy doing a pull when it comes.
|
||||
}
|
||||
}
|
||||
@@ -202,10 +204,10 @@ func (p *rwFolder) Serve() {
|
||||
}
|
||||
|
||||
// RemoteLocalVersion() is a fast call, doesn't touch the database.
|
||||
curVer := p.model.RemoteLocalVersion(p.folder)
|
||||
if curVer == prevVer {
|
||||
curVer, ok := p.model.RemoteLocalVersion(p.folder)
|
||||
if !ok || curVer == prevVer {
|
||||
if debug {
|
||||
l.Debugln(p, "skip (curVer == prevVer)", prevVer)
|
||||
l.Debugln(p, "skip (curVer == prevVer)", prevVer, ok)
|
||||
}
|
||||
p.pullTimer.Reset(nextPullIntv)
|
||||
continue
|
||||
@@ -229,7 +231,7 @@ func (p *rwFolder) Serve() {
|
||||
// sync. Remember the local version number and
|
||||
// schedule a resync a little bit into the future.
|
||||
|
||||
if lv := p.model.RemoteLocalVersion(p.folder); lv < curVer {
|
||||
if lv, ok := p.model.RemoteLocalVersion(p.folder); ok && lv < curVer {
|
||||
// There's a corner case where the device we needed
|
||||
// files from disconnected during the puller
|
||||
// iteration. The files will have been removed from
|
||||
@@ -278,7 +280,7 @@ func (p *rwFolder) Serve() {
|
||||
l.Debugln(p, "rescan")
|
||||
}
|
||||
|
||||
if err := p.model.ScanFolder(p.folder); err != nil {
|
||||
if err := p.model.internalScanFolderSubs(p.folder, nil); err != nil {
|
||||
// Potentially sets the error twice, once in the scanner just
|
||||
// by doing a check, and once here, if the error returned is
|
||||
// the same one as returned by CheckFolderHealth, though
|
||||
@@ -296,6 +298,29 @@ func (p *rwFolder) Serve() {
|
||||
initialScanCompleted = true
|
||||
}
|
||||
|
||||
case req := <-p.scanNow:
|
||||
if err := p.model.CheckFolderHealth(p.folder); err != nil {
|
||||
l.Infoln("Skipping folder", p.folder, "scan due to folder error:", err)
|
||||
req.err <- err
|
||||
continue
|
||||
}
|
||||
|
||||
if debug {
|
||||
l.Debugln(p, "forced rescan")
|
||||
}
|
||||
|
||||
if err := p.model.internalScanFolderSubs(p.folder, req.subs); err != nil {
|
||||
// Potentially sets the error twice, once in the scanner just
|
||||
// by doing a check, and once here, if the error returned is
|
||||
// the same one as returned by CheckFolderHealth, though
|
||||
// duplicate set is handled by setError.
|
||||
p.setError(err)
|
||||
req.err <- err
|
||||
continue
|
||||
}
|
||||
|
||||
req.err <- nil
|
||||
|
||||
case next := <-p.delayScan:
|
||||
p.scanTimer.Reset(next)
|
||||
}
|
||||
@@ -317,6 +342,15 @@ func (p *rwFolder) IndexUpdated() {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *rwFolder) Scan(subs []string) error {
|
||||
req := rescanRequest{
|
||||
subs: subs,
|
||||
err: make(chan error),
|
||||
}
|
||||
p.scanNow <- req
|
||||
return <-req.err
|
||||
}
|
||||
|
||||
func (p *rwFolder) String() string {
|
||||
return fmt.Sprintf("rwFolder/%s@%p", p.folder, p)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Glob implements filepath.Glob, but works with Windows long path prefixes.
|
||||
// Deals with https://github.com/golang/go/issues/10577
|
||||
func Glob(pattern string) (matches []string, err error) {
|
||||
if !hasMeta(pattern) {
|
||||
|
||||
@@ -21,11 +21,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
FSCTL_GET_REPARSE_POINT = 0x900a8
|
||||
FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000
|
||||
FILE_ATTRIBUTE_REPARSE_POINT = 0x400
|
||||
IO_REPARSE_TAG_SYMLINK = 0xA000000C
|
||||
SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1
|
||||
Win32FsctlGetReparsePoint = 0x900a8
|
||||
Win32FileFlagOpenReparsePoint = 0x00200000
|
||||
Win32FileAttributeReparsePoint = 0x400
|
||||
Win32IOReparseTagSymlink = 0xA000000C
|
||||
Win32SymbolicLinkFlagDirectory = 0x1
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -106,7 +106,7 @@ func Read(path string) (string, uint32, error) {
|
||||
if err != nil {
|
||||
return "", protocol.FlagSymlinkMissingTarget, err
|
||||
}
|
||||
handle, err := syscall.CreateFile(ptr, 0, syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS|FILE_FLAG_OPEN_REPARSE_POINT, 0)
|
||||
handle, err := syscall.CreateFile(ptr, 0, syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, nil, syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS|Win32FileFlagOpenReparsePoint, 0)
|
||||
if err != nil || handle == syscall.InvalidHandle {
|
||||
return "", protocol.FlagSymlinkMissingTarget, err
|
||||
}
|
||||
@@ -114,12 +114,12 @@ func Read(path string) (string, uint32, error) {
|
||||
var ret uint16
|
||||
var data reparseData
|
||||
|
||||
r1, _, err := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), FSCTL_GET_REPARSE_POINT, 0, 0, uintptr(unsafe.Pointer(&data)), unsafe.Sizeof(data), uintptr(unsafe.Pointer(&ret)), 0, 0)
|
||||
r1, _, err := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), Win32FsctlGetReparsePoint, 0, 0, uintptr(unsafe.Pointer(&data)), unsafe.Sizeof(data), uintptr(unsafe.Pointer(&ret)), 0, 0)
|
||||
if r1 == 0 {
|
||||
return "", protocol.FlagSymlinkMissingTarget, err
|
||||
}
|
||||
|
||||
var flags uint32 = 0
|
||||
var flags uint32
|
||||
attr, err := syscall.GetFileAttributes(ptr)
|
||||
if err != nil {
|
||||
flags = protocol.FlagSymlinkMissingTarget
|
||||
@@ -154,10 +154,10 @@ func Create(source, target string, flags uint32) error {
|
||||
|
||||
stat, err := os.Stat(path)
|
||||
if err == nil && stat.IsDir() {
|
||||
mode = SYMBOLIC_LINK_FLAG_DIRECTORY
|
||||
mode = Win32SymbolicLinkFlagDirectory
|
||||
}
|
||||
} else if flags&protocol.FlagDirectory != 0 {
|
||||
mode = SYMBOLIC_LINK_FLAG_DIRECTORY
|
||||
mode = Win32SymbolicLinkFlagDirectory
|
||||
}
|
||||
|
||||
r0, _, err := syscall.Syscall(procCreateSymbolicLink.Addr(), 3, uintptr(unsafe.Pointer(srcp)), uintptr(unsafe.Pointer(trgp)), uintptr(mode))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-CONFIG" "5" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-CONFIG" "5" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-config \- Syncthing Configuration
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-DEVICE-IDS" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-DEVICE-IDS" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-device-ids \- Understanding Device IDs
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-EVENT-API" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-EVENT-API" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-event-api \- Event API
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-FAQ" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-FAQ" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-faq \- Frequently Asked Questions
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-NETWORKING" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-NETWORKING" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-networking \- Firewall Setup
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-REST-API" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-REST-API" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-rest-api \- REST API
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-SECURITY" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-SECURITY" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-security \- Security Principles
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING-STIGNORE" "5" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING-STIGNORE" "5" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing-stignore \- Prevent files from being synchronized to other nodes
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "TODO" "7" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "TODO" "7" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
Todo \- Keep automatic backups of deleted files by other nodes
|
||||
.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SYNCTHING" "1" "June 20, 2015" "v0.11" "Syncthing"
|
||||
.TH "SYNCTHING" "1" "June 28, 2015" "v0.11" "Syncthing"
|
||||
.SH NAME
|
||||
syncthing \- Syncthing
|
||||
.
|
||||
@@ -162,7 +162,7 @@ Upgrade not available
|
||||
.B 3
|
||||
Restarting
|
||||
.TP
|
||||
.B 5
|
||||
.B 4
|
||||
Upgrading
|
||||
.UNINDENT
|
||||
.sp
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -67,17 +68,17 @@ func TestReset(t *testing.T) {
|
||||
|
||||
// Reset indexes of the default folder
|
||||
log.Println("Reset indexes of default folder")
|
||||
_, err = p.Post("/rest/system/reset?folder=default", nil)
|
||||
bs, err := p.Post("/rest/system/reset?folder=default", nil)
|
||||
if err != nil {
|
||||
t.Fatal("Failed to reset indexes of the default folder:", err)
|
||||
t.Fatalf("Failed to reset indexes (default): %v (%s)", err, bytes.TrimSpace(bs))
|
||||
}
|
||||
|
||||
// Syncthing restarts on reset. But we set STNORESTART=1 for the tests. So
|
||||
// we wait for it to exit, then do a stop so the rc.Process is happy and
|
||||
// restart it again.
|
||||
time.Sleep(time.Second)
|
||||
checkedStop(t, p)
|
||||
p = startInstance(t, 1)
|
||||
defer checkedStop(t, p)
|
||||
|
||||
m, err = p.Model("default")
|
||||
if err != nil {
|
||||
@@ -108,17 +109,14 @@ func TestReset(t *testing.T) {
|
||||
|
||||
// Reset all indexes
|
||||
log.Println("Reset DB...")
|
||||
_, err = p.Post("/rest/system/reset?folder=default", nil)
|
||||
bs, err = p.Post("/rest/system/reset", nil)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to reset indexes", err)
|
||||
t.Fatalf("Failed to reset indexes (all): %v (%s)", err, bytes.TrimSpace(bs))
|
||||
}
|
||||
|
||||
// Syncthing restarts on reset. But we set STNORESTART=1 for the tests. So
|
||||
// we wait for it to exit, then do a stop so the rc.Process is happy and
|
||||
// restart it again.
|
||||
// we wait for it to exit, then restart it again.
|
||||
time.Sleep(time.Second)
|
||||
checkedStop(t, p)
|
||||
|
||||
p = startInstance(t, 1)
|
||||
defer checkedStop(t, p)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math/rand"
|
||||
"os"
|
||||
@@ -82,6 +83,18 @@ func TestSyncClusterStaggeredVersioning(t *testing.T) {
|
||||
testSyncCluster(t)
|
||||
}
|
||||
|
||||
func TestSyncClusterForcedRescan(t *testing.T) {
|
||||
// Use no versioning
|
||||
id, _ := protocol.DeviceIDFromString(id2)
|
||||
cfg, _ := config.Load("h2/config.xml", id)
|
||||
fld := cfg.Folders()["default"]
|
||||
fld.Versioning = config.VersioningConfiguration{}
|
||||
cfg.SetFolder(fld)
|
||||
cfg.Save()
|
||||
|
||||
testSyncClusterForcedRescan(t)
|
||||
}
|
||||
|
||||
func testSyncCluster(t *testing.T) {
|
||||
// This tests syncing files back and forth between three cluster members.
|
||||
// Their configs are in h1, h2 and h3. The folder "default" is shared
|
||||
@@ -287,6 +300,116 @@ func testSyncCluster(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testSyncClusterForcedRescan(t *testing.T) {
|
||||
// During this test, we create 1K files, remove and then create them
|
||||
// again. However, during these operations we will perform scan operations
|
||||
// such that other nodes will retrieve these options while data is
|
||||
// changing.
|
||||
|
||||
// When -short is passed, keep it more reasonable.
|
||||
timeLimit := longTimeLimit
|
||||
if testing.Short() {
|
||||
timeLimit = shortTimeLimit
|
||||
}
|
||||
|
||||
log.Println("Cleaning...")
|
||||
err := removeAll("s1", "s12-1",
|
||||
"s2", "s12-2", "s23-2",
|
||||
"s3", "s23-3",
|
||||
"h1/index*", "h2/index*", "h3/index*")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Create initial folder contents. All three devices have stuff in
|
||||
// "default", which should be merged. The other two folders are initially
|
||||
// empty on one side.
|
||||
|
||||
log.Println("Generating files...")
|
||||
if err := os.MkdirAll("s1/test-stable-files", 0755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for i := 0; i < 1000; i++ {
|
||||
name := fmt.Sprintf("s1/test-stable-files/%d", i)
|
||||
if err := ioutil.WriteFile(name, []byte(time.Now().Format(time.RFC3339Nano)), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the expected state of folders after the sync
|
||||
expected, err := directoryContents("s1")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Start the syncers
|
||||
p0 := startInstance(t, 1)
|
||||
defer checkedStop(t, p0)
|
||||
p1 := startInstance(t, 2)
|
||||
defer checkedStop(t, p1)
|
||||
p2 := startInstance(t, 3)
|
||||
defer checkedStop(t, p2)
|
||||
|
||||
p := []*rc.Process{p0, p1, p2}
|
||||
|
||||
start := time.Now()
|
||||
for time.Since(start) < timeLimit {
|
||||
rescan := func() {
|
||||
for i := range p {
|
||||
if err := p[i].Rescan("default"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.Println("Forcing rescan...")
|
||||
rescan()
|
||||
|
||||
// Sync stuff and verify it looks right
|
||||
err = scSyncAndCompare(p, [][]fileInfo{expected})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
log.Println("Altering...")
|
||||
|
||||
// Delete and recreate stable files while scanners and pullers are active
|
||||
for i := 0; i < 1000; i++ {
|
||||
name := fmt.Sprintf("s1/test-stable-files/%d", i)
|
||||
if err := os.Remove(name); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if rand.Intn(10) == 0 {
|
||||
rescan()
|
||||
}
|
||||
}
|
||||
|
||||
rescan()
|
||||
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
for i := 0; i < 1000; i++ {
|
||||
name := fmt.Sprintf("s1/test-stable-files/%d", i)
|
||||
if err := ioutil.WriteFile(name, []byte(time.Now().Format(time.RFC3339Nano)), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if rand.Intn(10) == 0 {
|
||||
rescan()
|
||||
}
|
||||
}
|
||||
|
||||
rescan()
|
||||
|
||||
// Prepare the expected state of folders after the sync
|
||||
expected, err = directoryContents("s1")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(expected) != 1001 {
|
||||
t.Fatal("s1 does not have 1001 files;", len(expected))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func scSyncAndCompare(p []*rc.Process, expected [][]fileInfo) error {
|
||||
log.Println("Syncing...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user