0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core/frontend/services/themes
Hannah Wolfe d541a14826 Change theme uploads to move & delete at end
- Currently theme uploads delete the existing theme before copying the new files into place
- If something goes wrong with the delete action, you will end up in a bad state
   - Some or all of the files may be deleted, but now Ghost won't try to put the new theme in place, instead returning an error
   - This leaves you with an invalid active theme and a broken site
- Unlike delete, move is a one-hit operation that succeeds or fails, there moving a theme is safer than deleting
- This updated code moves the old theme to a folder with the name [theme-name]-[uuid] before copying the new theme into place
- Even if this fails, the files should not be gone
- There's a cleanup operation to remove the theme backup at the end, but we don't care too much if this fails
2020-06-08 16:12:17 +01:00
..
config Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
engines Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
handlebars Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
activate.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
active.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
engine.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
i18n.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
index.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
list.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
loader.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
middleware.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
storage.js Change theme uploads to move & delete at end 2020-06-08 16:12:17 +01:00
ThemeStorage.js Change theme uploads to move & delete at end 2020-06-08 16:12:17 +01:00
to-json.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
validate.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00