mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Server stdin migration: addfolder
This commit is contained in:
+3
-3
@@ -377,7 +377,7 @@ func ShearRemoteFromClient(targetLocationIncomplete string) {
|
||||
|
||||
// call the server to remotely shear the target and add it to the deletions list
|
||||
// deviceID and targetLocationIncomplete are separated by \x1d, path separators are replaced with \x1e, and spaces are replaced with \x1f TODO is there a need to combine deviceID and targetLocationIncomplete into one argument?
|
||||
GetSSHOutput("libmuttonserver shear "+deviceID+"\x1d"+strings.ReplaceAll(strings.ReplaceAll(targetLocationIncomplete, backend.PathSeparator, "\x1e"), " ", "\x1f"), "", false) // TODO seems to already have Windows server support, perhaps copy this approach to AddFolderRemoteFromClient
|
||||
GetSSHOutput("libmuttonserver shear "+deviceID+"\x1d"+strings.ReplaceAll(strings.ReplaceAll(targetLocationIncomplete, backend.PathSeparator, "\x1e"), " ", "\x1f"), "", false)
|
||||
|
||||
os.Exit(0) // sync is not required after shearing since the target has already been removed from the local system
|
||||
}
|
||||
@@ -398,8 +398,8 @@ func deletionSync(deletions []string) {
|
||||
|
||||
// AddFolderRemoteFromClient creates a new entry-containing directory on the local system and calls the server to create the folder remotely
|
||||
func AddFolderRemoteFromClient(targetLocationIncomplete string) {
|
||||
AddFolderLocal(targetLocationIncomplete) // add the folder on the local system
|
||||
GetSSHOutput("libmuttonserver addfolder "+strings.ReplaceAll(targetLocationIncomplete, " ", "\x1f"), "", false) // call the server to create the folder remotely TODO Windows server support
|
||||
AddFolderLocal(targetLocationIncomplete) // add the folder on the local system
|
||||
GetSSHOutput("libmuttonserver addfolder", strings.ReplaceAll(targetLocationIncomplete, backend.PathSeparator, "\x1d"), false) // call the server to create the folder remotely
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user