Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
Go to file
Kevin Ansfield 523278b295 🐛 Fixed subdirectory handling and deduplication
no issue

Ghost's relative->absolute handling is a little strange when the rootUrl includes a subdirectory. Root-relative paths such as /content/image.jpg are actually treated as subdirectory-relative. This means that it's possible to migrate from a root config to a subdirectory config without migrating data in the database, _however_ that means that the database will now have a mix of path styles (/content/image.png and /subdir/content/image.png). To handle this when all root-relative paths are treated as subdir-relative we have to rely on subdirectory deduplication.

- updates tests to reflect correct subdirectory handling according to the above rules
- fixes missing subdirectories when root urls contain subdirectories but relative paths do not
- fixes subdirectory deduplication when the supplied url/path does not have a trailing slash but matches the root url's subdirectory
2019-10-02 12:33:34 +01:00
ghost 🐛 Fixed subdirectory handling and deduplication 2019-10-02 12:33:34 +01:00