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

juno clear CLI command should not delete .well-know/ic-domains #484

Closed
peterpeterparker opened this issue Apr 16, 2024 · 0 comments · Fixed by #485
Closed

juno clear CLI command should not delete .well-know/ic-domains #484

peterpeterparker opened this issue Apr 16, 2024 · 0 comments · Fixed by #485
Assignees
Labels
bug Something isn't working

Comments

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Apr 16, 2024

juno clear incorrectly delete all #dapp assets which includes the /.well-known/ic-domains. File which should not be deleted (except if dev delete custom domain).

let full_paths = match rule.mem() {
        Memory::Heap => STATE.with(|state| {
            let state_ref = state.borrow();
            get_assets_heap(collection, &state_ref.heap.storage.assets)
                .iter()
                // TODO: filter BN_WELL_KNOWN_CUSTOM_DOMAINS
                .map(|(_, asset)| asset.key.full_path.clone())
                .collect()
        }),
        Memory::Stable => STATE.with(|state| {
            let stable = get_assets_stable(collection, &state.borrow().stable.assets);
            stable
                .iter()
                .map(|(_, asset)| asset.key.full_path.clone())
                .collect()
        }),
    };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant