mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 08:37:20 -04:00
When a folder is created on the client, also create it on the server
This commit is contained in:
@@ -24,6 +24,9 @@ func main() {
|
|||||||
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
||||||
targetLocationIncomplete := strings.ReplaceAll(strings.ReplaceAll(deviceIDTargetLocation[1], "\x1f", " "), "\x1e", backend.PathSeparator)
|
targetLocationIncomplete := strings.ReplaceAll(strings.ReplaceAll(deviceIDTargetLocation[1], "\x1f", " "), "\x1e", backend.PathSeparator)
|
||||||
sync.Shear(targetLocationIncomplete, deviceIDTargetLocation[0])
|
sync.Shear(targetLocationIncomplete, deviceIDTargetLocation[0])
|
||||||
|
case "addfolder":
|
||||||
|
// add a new folder to the server
|
||||||
|
sync.AddFolder(strings.ReplaceAll(args[2], "\x1f", " "), true)
|
||||||
case "register":
|
case "register":
|
||||||
// register a new device ID
|
// register a new device ID
|
||||||
os.Create(backend.ConfigDir + backend.PathSeparator + "devices" + backend.PathSeparator + args[2])
|
os.Create(backend.ConfigDir + backend.PathSeparator + "devices" + backend.PathSeparator + args[2])
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ func main() {
|
|||||||
case "note", "-n":
|
case "note", "-n":
|
||||||
cli.AddEntry(targetLocation, true, 2)
|
cli.AddEntry(targetLocation, true, 2)
|
||||||
case "folder", "-f":
|
case "folder", "-f":
|
||||||
backend.AddFolder(targetLocation)
|
sync.AddFolder(args[1], false)
|
||||||
default:
|
default:
|
||||||
cli.HelpAdd()
|
cli.HelpAdd()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user