Conversation
I had trouble with `escape` butchering a folderpath into a filename. I found that using a simple regex match to pick off the filename solved my problems. Don't know if other people might have had this issue as well. I'm on Windows 7 and Julia v0.7.
Can you please elaborate? |
|
Sorry, wasn't sure how to explain that. JuliaStrings/StringEncodings.jl#22 is the relevant issue. If you look at the line that errors, it says and when I looked in the folder, I saw this So you see that the It is unclear to me why some files were written with the |
|
I suspect this would not work on julia 0.6, and is a difference in behavior between the different versions of 7zip bundled in julia 0.6 vs nightly. |
src/WinRPM.jl
Outdated
| end | ||
| cache = getcachedir(source) | ||
| path2 = joinpath(cache,escape(path)) | ||
| path2 = joinpath(cache, match(r"[^/]+$",path).match) |
There was a problem hiding this comment.
I found that using a simple regex match to pick off the filename solved my problems.
The match should probably be replaced with basename
There was a problem hiding this comment.
Did not know about that function! That seems to do the trick just fine.
The `basename` function does what the previous regex match did, so use that instead.
I had trouble with
escapebutchering a folderpath into a filename. I found that using a simple regex match to pick off the filename solved my problems. Don't know if other people might have had this issue as well. I'm on Windows 7 and Julia v0.7.