Health-Sprints / Benchmark

https://vivliostyle.vercel.app/#src=https://health-sprints.github.io/Benchmark/html/index.html&bookMode=true
0 stars 0 forks source link

Doc names after Copying doc #2

Open mrchristian opened 3 years ago

mrchristian commented 3 years ago

I am having an issue that when I copy docs and them move them to a new folder the name of the doc is inconsistent. The doc name can change from Copy of xxx, and then drop the 'Copy of' after moving or when refreshing

johanneswilm commented 3 years ago

File names are calculated using the values of two different fields:

The title of the document. The path of the document. (Default: "/")

If the path ends with "/", then return the title of the document. Otherwise return the last part of the path between the last "/" and the end of the path.

So in your example:

Say you have a document A with title "My title" and path "/documents/". The filename will be "My title".

Now you copy it. The copying mechanism gives document B the title "My title" and the path "/documents/Copy of My title".

Then you move it. You change the path from "/documents/Copy of My title" to "/my other documents/". Therefore, when figuring out the file name, it will see that the path ended with a "/" and therefore return the filename based on the title: "My title".

If you don't want this to happen, then move it instead from "/documents/Copy of My title" to "/my other documents/Copy of My title". let me know if there are changes in the move dialog you would want to make that step easier to do.

johanneswilm commented 3 years ago

Fixed this so that moving files works consistently.