Skip to content

Commit

Permalink
Manual fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
AudriusButkevicius committed Sep 28, 2014
1 parent 5ec9508 commit fdf8ee7
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 88 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ syncthing

This is the `syncthing` project. The following are the project goals:

1. Define a protocol for synchronization of a file folder between a
number of collaborating devices. The protocol should be well defined,
unambiguous, easily understood, free to use, efficient, secure and
language neutral. This is the [Block Exchange
1. Define a protocol for synchronization of a folder between a number of
collaborating devices. The protocol should be well defined, unambiguous,
easily understood, free to use, efficient, secure and language neutral.
This is the [Block Exchange
Protocol](https://github.com/syncthing/syncthing/blob/master/protocol/PROTOCOL.md).

2. Provide the reference implementation to demonstrate the usability of
Expand Down
2 changes: 1 addition & 1 deletion cmd/syncthing/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func restGetNeed(m *model.Model, w http.ResponseWriter, r *http.Request) {
var qs = r.URL.Query()
var folder = qs.Get("folder")

files := m.NeedFilesFolderLimited(folder, 100, 2500) // max 100 files or 2500 blocks
files := m.NeedFolderFilesLimited(folder, 100, 2500) // max 100 files or 2500 blocks

w.Header().Set("Content-Type", "application/json; charset=utf-8")
json.NewEncoder(w).Encode(files)
Expand Down
6 changes: 3 additions & 3 deletions cmd/syncthing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ nextFolder:
// that all files have been deleted which might not be the case,
// so mark it as invalid instead.
if err != nil || !fi.IsDir() {
l.Warnf("Stopping folder %q - directory missing, but has files in index", folder.ID)
cfg.Folders[i].Invalid = "folder directory missing"
l.Warnf("Stopping folder %q - path does not exist, but has files in index", folder.ID)
cfg.Folders[i].Invalid = "folder path missing"
continue nextFolder
}
} else if os.IsNotExist(err) {
Expand All @@ -460,7 +460,7 @@ nextFolder:

if err != nil {
// If there was another error or we could not create the
// directory, the folder is invalid.
// path, the folder is invalid.
l.Warnf("Stopping folder %q - %v", err)
cfg.Folders[i].Invalid = err.Error()
continue nextFolder
Expand Down
5 changes: 3 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,9 @@ func convertV2V3(cfg *Configuration) {

func convertV1V2(cfg *Configuration) {
// Collect the list of devices.
// Replace device configs inside folders with only a reference to the nide ID.
// Set all folders to read only if the global read only flag is set.
// Replace device configs inside folders with only a reference to the
// device ID. Set all folders to read only if the global read only flag is
// set.
var devices = map[string]FolderDeviceConfiguration{}
for i, folder := range cfg.Folders {
cfg.Folders[i].ReadOnly = cfg.Options.Deprecated_ReadOnly
Expand Down
Loading

0 comments on commit fdf8ee7

Please sign in to comment.