Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support slash in layer ID #121

Merged
merged 2 commits into from
Dec 1, 2022
Merged

Conversation

keichan34
Copy link
Contributor

@keichan34 keichan34 commented Nov 24, 2022

Description

Fix #56 by creating directories recursively after joining the layers directory with the layer ID. Before this fix, the layers directory was being created, but if the ID contained a slash, it would try to write the file to an nonexistent directory, resulting in an error.

Type of Pull Request

  • Adding a feature
  • Fixing a bug
  • Maintaining documents
  • Others ()

Verify the followings

  • Code is up-to-date with the main branch
  • No build errors after npm run build
  • No lint errors after npm run lint
  • No errors on using charites help globally
  • Make sure all the exsiting features working well
  • Have you added at least one unit test if you are going to add new feature?
  • Have you updated documentation?

Refer to CONTRIBUTING.MD for more details.

@hfu
Copy link
Member

hfu commented Nov 28, 2022

I like this implementation although I am not really sure this works perfectly in Windows environments ;-)

Copy link
Contributor

@ubukawa ubukawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @keichan34 ,
Thank you very much for this improvement! I really appreciate it.
(I am sorry for my late response!)

@keichan34
Copy link
Contributor Author

@hfu Ah, that's a good point. If the name of the file isn't stable between UNIX and Windows operating systems, charites projects won't be able to shared between them. I'll double check what happens on Windows and make fixes as necessary. Thanks!

@ubukawa
Copy link
Contributor

ubukawa commented Nov 30, 2022

Just for your information. I tried this on a docker container. This is really wonderful.
We can beautifully import JSON style into a series of sub-directory.
https://github.com/ubukawa/cmv-test/tree/main/esri/layers

We can have a long name for a style layer.
When building a JSON style, I found that there would be an error if we use ">(「折り返し形式のブロックスカラー」)" in the layers where we use "!!inc/file"
image

I wonder we may need to avoid using ">". This is not directly related to this PR, I will share it at issue.]

@keichan34 keichan34 merged commit 88c9215 into unvt:main Dec 1, 2022
@keichan34 keichan34 deleted the support-slash-in-layer-id branch December 1, 2022 06:26
@keichan34 keichan34 mentioned this pull request Dec 1, 2022
11 tasks
@keichan34 keichan34 added the enhancement New feature or request label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"/" in layer id
3 participants