-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for relative paths #6
Comments
Hi @jhoek, Thank you for filing the issue! I am not able to reproduce it yet though. 😕 Not saying that the issue is not there, but I can't get it to throw an error yet when using relative paths. |
No problem, @rvanbekkum. You are passing PowerShell-style paths directly to XmlDocument.Load, which is unaware of the path syntax and the PowerShell current directory.
results in
As you can see, what XmlDocument tries to load is my home folder combined with the path from the parameter value ( B.t.w. - |
I just realised that you may have tested with a relative path that XmlDocument.Load could understand, e.g. one that starts with a single or double "." (for either the current or parent directory). Also, at the time of your test, your current folder according to .NET (initially your home folder, judging from the above) may coincidentally have matched your current folder in PowerShell (which also uses your home folder as a default). Under those two conditions, your test may have succeeded where mine failed. |
Hey, I'm encountering the same issue when using relative path.
The upper command is resulting in a batch of exceptions
However, give that one is working :
It seems it's using System32 as root directory rather than current path. |
Changes for this have been shipped in the new release, version 1.3.0. |
When I ran
from the folder of my AL-project, the cmdlet claims that the source path could not be found, but it appears to be looking for it in my home folder (
c:\Users\MyUserName
). Please consider adding support for relative paths, such as ".\Translations\MyFile.txt" and "..\Translations\MyFile.txt".P.S.: I haven't tested this, but the cmdlets may also lack support for special paths such as PowerShell drives (MyDrive:\MyFile.txt) and ~ (which represents the user's home folder).
The text was updated successfully, but these errors were encountered: