leonardoquevedox / capacitor-resources

Generates icon & splash screen for Capacitor projects using javascript only.
MIT License
136 stars 16 forks source link

Bug Fix - Copy Android/iOS - Error: ENOENT: no such file or directory #11

Closed bvdalling closed 2 years ago

bvdalling commented 2 years ago

Description

This PR aims to fix the error referenced in Issue 7. This fixes the error by wrapping the paths in a string. This allows Node to parse the correct file path to the copy modules. Please reference this Stack Overflow accepted answer as a form of proof.

Expected Impact

This fix should have no impact on existing users and installations. This addresses how Node parsed the file path for an expected resource. This only affects the exec statements in src/copy/index.js by wrapping the file path inside of a string.

Tests

This has been tested in a file path on windows c:\Users\first last\Projects\ionic-app and c:\Users\firstlast\Projects\ionic-app. I will be performing a test on OSX shortly and will post the result.

The expected test result will be no errors with a space inside the pathname. And, no error when performed without a space in the pathname.