Skip to content

zip-create: remove images in zip path#614

Closed
celestecote21 wants to merge 1 commit intoTryGhost:mainfrom
celestecote21:fix/remove-images-in-zip-name
Closed

zip-create: remove images in zip path#614
celestecote21 wants to merge 1 commit intoTryGhost:mainfrom
celestecote21:fix/remove-images-in-zip-name

Conversation

@celestecote21
Copy link
Copy Markdown
Contributor

The tool must not alter file paths between the local directory and what will be served by the Ghost instance.

On the "Copy the directory" task, an /images is added to the destination temporary path. This addition changes the path of files that is preserved by the zipping process.
This results in an incorrect path on the Ghost instance once uploaded, as the import process preserves paths.

The tool must not alter file paths between the local directory and what
will be served by the Ghost instance.

On the "Copy the directory" task, an `/images` is added to the
destination temporary path. This addition changes the path of files that
is preserved by the zipping process.
This results in an incorrect path on the Ghost instance once uploaded,
as the import process preserves paths.
@PaulAdamDavis
Copy link
Copy Markdown
Member

Hi @celestecote21, thanks for the PR! The folder being appended like that is correct, as that's what defines the unzipped folder name, which Ghost depends on in the import process.

With the proposed change, if I had a large folder called my_images, and called gctools /path/to/my_images -M 100, I would get chunks like my_images_01.zip that would unzip with my_images_0. With the current implementation, unzipping my_images_01.zip would give me images, which is what's needed.

I agree that the hard-coded folder name is not ideal, but this is unfortunately not the correct fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants