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

Reorder code to fix absoluteFilePath on windows fixes #11312 #11346

Merged
merged 1 commit into from Mar 18, 2021

Conversation

PrestonGiorgianni
Copy link
Contributor

This pull request will reorder the operations when attempting to get the absolute file path of an asset. I have reordered the operations in this pull request so we will convert the asset path before checking if it exists. Before when you passed a windows files path to getAbsoluteFilePath (e.g. getAbsoluteFilePath(tests\test)) the array that holds the assets would be storing the path with a linux like separator (e.g. test/test). Since the separator does not match, the asset was not found. The convertToStandartPath function takes care of this by changing the assetPath to use the proper separator. This function was being called after the existence check, which was too late causing the code to throw the error on line 365.

@filipenevola sorry about the delay for getting the pr up on this.

Closes #11312

@CLAassistant
Copy link

CLAassistant commented Mar 15, 2021

CLA assistant check
All committers have signed the CLA.

@PrestonGiorgianni PrestonGiorgianni marked this pull request as ready for review March 15, 2021 21:39
@filipenevola filipenevola changed the base branch from devel to release-2.2 March 18, 2021 20:03
@filipenevola filipenevola added this to the Release 2.2 milestone Mar 18, 2021
@filipenevola filipenevola merged commit 4209c33 into meteor:release-2.2 Mar 18, 2021
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.

Windows separator for Assets.absoluteFilePath
3 participants