# \[Bug\] Inconsistent behavior of path generation local vs remote

**URL:** https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006
**Category:** Feature
**Created:** [October 30, 2019, 2:15pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006 "2019-10-30T14:15:27Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![TechupBusiness](https://forum.syncthing.net/user_avatar/forum.syncthing.net/techupbusiness/32/10832_2.png) [@TechupBusiness](https://forum.syncthing.net/u/TechupBusiness)
#### Post date: [October 30, 2019, 2:15pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/1 "2019-10-30T14:15:27Z")

</div>

When I create a new folder on my local instance and use a path separator in the title, it adds the separator to the path (automatically, which makes sense!):

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/9/99a11ff672b6e0d79d4d27321b8daead549149f4.png)

But when I share this folder to another machine, it gets the same label there, but the automatically generated path is different to the one added manually (local).

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/6/6a62b8d7dfde076121dfe5ae4099b5113fd2ee89.png)

It would be great if the path would be the same remote, allowing the generation of sub-directories.

Otherwise (=workaround) I need to avoid sharing a folder until I created the folder manually on all other peers with the same folder ID, which is a non-handy work. If I forget it I need to delete and recreate these folders on the other machine.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 30, 2019, 2:19pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/2 "2019-10-30T14:19:22Z")

</div>

To be honest, I think we should force folder ids to be letters and numbers only.

---

<div class="post-metadata">

### Author: ![TechupBusiness](https://forum.syncthing.net/user_avatar/forum.syncthing.net/techupbusiness/32/10832_2.png) [@TechupBusiness](https://forum.syncthing.net/u/TechupBusiness)
#### Post date: [October 30, 2019, 2:23pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/3 "2019-10-30T14:23:18Z")

</div>

Thats fine with me, I didnt say anything about the ID 🙂 Or do you mean Label ? Then I would totally disagree as long as there is no hierarchical structure of folders in syncthing.

PS I hope nobody mind but I realized that at least bugs should be maybe better in github: [Inconsistent behavior of path generation local vs remote · Issue #6113 · syncthing/syncthing · GitHub](https://github.com/syncthing/syncthing/issues/6113)

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 30, 2019, 3:40pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/4 "2019-10-30T15:40:00Z")

</div>

Ids used to be labels, so I still use them interchangeably.

Actually, I now recall this is intentional, to prevent attacks by people suggesting to share …\etc, and them not checking the resulting path.

---

<div class="post-metadata">

### Author: ![TechupBusiness](https://forum.syncthing.net/user_avatar/forum.syncthing.net/techupbusiness/32/10832_2.png) [@TechupBusiness](https://forum.syncthing.net/u/TechupBusiness)
#### Post date: [October 31, 2019, 8:57am UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/5 "2019-10-31T08:57:15Z")

</div>

Hm… When I put a label `/etc` this should create a folder in the default folder path, in this example `/var/syncthing/etc` (as a label `etc` would do). It’s not that a peer should be able to write a folder everywhere on the remote filesystem (like `/etc`).

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 31, 2019, 9:08am UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/6 "2019-10-31T09:08:15Z")

</div>

Sure, but you can have double dots to go a level up etc.

---

<div class="post-metadata">

### Author: ![TechupBusiness](https://forum.syncthing.net/user_avatar/forum.syncthing.net/techupbusiness/32/10832_2.png) [@TechupBusiness](https://forum.syncthing.net/u/TechupBusiness)
#### Post date: [October 31, 2019, 10:52am UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/7 "2019-10-31T10:52:09Z")

</div>

If it’s possible to remove such characters, it should be also possible to just prevent `..` or better just allow `/` and `\` (for windows).

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 31, 2019, 12:47pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/8 "2019-10-31T12:47:15Z")

</div>

I think we should just remove all path affecting characters on both sides, as the label influencing the path is a terrible idea to start with.

---

<div class="post-metadata">

### Author: ![TechupBusiness](https://forum.syncthing.net/user_avatar/forum.syncthing.net/techupbusiness/32/10832_2.png) [@TechupBusiness](https://forum.syncthing.net/u/TechupBusiness)
#### Post date: [October 31, 2019, 1:39pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/9 "2019-10-31T13:39:28Z")

</div>

For me it is very helpful 😉 As I have around 30 folder atm (would be more if it wouldnt be so complicated to maintain many folders) and they are in hierarchical structures which I wanted to reflect on the remote peer as well.

And because of a lack of hierarchical structure in the UI, I started using the folder structure as label.

BTW Google used the same concept in Gmail for the labels in the beginning, when they introduced the lab functionality “hierarchical labels”. When you disabled the functionality, you could see that the labels were simply a path, just displayed as a tree in backend when you enabled the functionality. This would also help the GUI IMHO. And a tree view to visually unselect paths within each syncthing-folder would be the master piece. But just dreaming 😃

PS maybe this kind of folder structure will become obsolete as soon as it’s easier to visually maintain ignores. No not maybe, I’m pretty sure though 🙂 (starting from v1.3.1 when unignoring of ignored deleted folders leads to a restore instead of deletion on all peers)

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [October 31, 2019, 4:04pm UTC](https://forum.syncthing.net/t/bug-inconsistent-behavior-of-path-generation-local-vs-remote/14006/10 "2019-10-31T16:04:36Z")

</div>

Sure, it’s helpful unintentionally.

You can still do that by specifying the path yourself.
