mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
Merge pull request #1230 from AudriusButkevicius/separator
Expose and use path separator (fixes #1163)
This commit is contained in:
commit
0eec945df1
@ -449,6 +449,7 @@ func restGetSystem(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
cpuUsageLock.RUnlock()
|
cpuUsageLock.RUnlock()
|
||||||
res["cpuPercent"] = cpusum / 10
|
res["cpuPercent"] = cpusum / 10
|
||||||
|
res["pathSeparator"] = string(filepath.Separator)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
json.NewEncoder(w).Encode(res)
|
json.NewEncoder(w).Encode(res)
|
||||||
|
@ -692,7 +692,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="pull-left"><span translate>Editing</span> <code>{{currentFolder.Path}}/.stignore</code></div>
|
<div class="pull-left"><span translate>Editing</span> <code>{{currentFolder.Path}}{{system.pathSeparator}}.stignore</code></div>
|
||||||
<button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="saveIgnores()"><span class="glyphicon glyphicon-ok"></span> <span translate>Save</span></button>
|
<button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="saveIgnores()"><span class="glyphicon glyphicon-ok"></span> <span translate>Save</span></button>
|
||||||
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> <span translate>Close</span></button>
|
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> <span translate>Close</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -889,6 +889,9 @@ angular.module('syncthing.core')
|
|||||||
|
|
||||||
$scope.editFolder = function (folderCfg) {
|
$scope.editFolder = function (folderCfg) {
|
||||||
$scope.currentFolder = angular.copy(folderCfg);
|
$scope.currentFolder = angular.copy(folderCfg);
|
||||||
|
if ($scope.currentFolder.Path.slice(-1) == $scope.system.pathSeparator) {
|
||||||
|
$scope.currentFolder.Path = $scope.currentFolder.Path.slice(0, -1);
|
||||||
|
}
|
||||||
$scope.currentFolder.selectedDevices = {};
|
$scope.currentFolder.selectedDevices = {};
|
||||||
$scope.currentFolder.Devices.forEach(function (n) {
|
$scope.currentFolder.Devices.forEach(function (n) {
|
||||||
$scope.currentFolder.selectedDevices[n.DeviceID] = true;
|
$scope.currentFolder.selectedDevices[n.DeviceID] = true;
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user