7z: relative paths like ..\Dir for input files lead to wrong filename in zip file
First of all, thank you for this great addin!
Input:


Output:


Workaround using $(TargetDir):



Thank you in advance for your efforts.
Michael
Hello Michael
I have a similar internal report LC-552 (861) related to missing first letters in file names, for example:
$(dbin = "bin/Release/")
- ok:
$(dbin)raw-> bin/Release/raw - missing letters:
$(dbin)raw/-> bin/Release/raw/ - missing letters:
$(dbin)/raw-> bin/Release//raw
This is bug of the SevenZipSharp 3rd party library as far as I remember it. Please check if this is the same issue.
I have the plan to completely replace SevenZipSharp through Conari. But still no time for this task. Not sure about today's SevenZipSharp but any PR are welcomed!
If this is relevant to this issue,
Please temporarily use the following rules for paths.
- Just avoid any trailing slashes and some incorrect double/triple etc.
- Try to not use any
..\in paths at all. You can convert relative path to full like
$([System.IO.Path]::GetFullPath('$(SolutionDir)$(OutDir)'))
- Also note the difference between
\and/here. That can be also replaced at any time like
$(OutDir.Replace('\', '/'))app.exe
Also note $(OutDir) contains a relative path which by default implicitly starts with $(SolutionDir) in most arguments.
But $(OutDir) can be different because of various project structure in used solutions. That's why $(TargetDir) is more correct way for the cases like yours.
Let me know if you still have the problems or questions. Thanks for using!
Thank you for the fast reply. I can live with the mentioned workaround. Michael