Unable to process files with url-escaped symbols in names
Operation System: (Windows or Linux or MacOS)
tested on Windows
DocFX Version Used: 2.39.2.0 (reproducable at 2.45.1 as well)
Template used: (default or statictoc or contain custom template)
default
Steps to Reproduce:
- name the file with %2D or any other url-escape code, e.g.
im%2Descaped.md(as azure devops wiki does) - use
"files": [ "*.md" ]in docfx.json - try to build
Expected Behavior: document builds
Actual Behavior:
Build failed.
[19-09-24 08:42:50.944]Error:System.IO.DirectoryNotFoundException: Unable to find part of path "D:\md\azurewiki2docfx\sources\im%2Aescaped.md".
в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.
Hey, what is the point to close old issues? Neither stalebot, nor anyone else will fix it if it is closed.
Sorry for late response... There must be some bug in the logic to fetch the file. You could try to work around this issue by changing the file name first.
The issue is while using the System.Uri to convert absolute path to relative path. it can be fixed easily when we move to netstandard2.1 thanks to the new method System.IO.Path.GetRelativePath.
Now I have done a fix. but I cannot raise a pull request as I don't have access to the repository. Can anyone help me? how can i become a contributor to this project?
Now I have done a fix. but I cannot raise a pull request as I don't have access to the repository. Can anyone help me? how can i become a contributor to this project?
Does a pull request from a forked repo work for you?
This is fixed in the latest version.
@yufeih Could you point me the pr for these fixes ? The issue is still happening with the version 2.75.2. This one is blocking us from moving some of our content processing of the ADO wiki's to CI/CD pipeline. I will be happy to assist with a fix if one is needed.