[
https://issues.apache.org/jira/browse/RYA-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16331237#comment-16331237
]
ASF GitHub Bot commented on RYA-447:
------------------------------------
Github user ejwhite922 commented on the issue:
https://github.com/apache/incubator-rya/pull/264
An alternative could be to escape all '\\' characters instead of changing
to '/'. Would this be a better solution?
final String userHome = System.getProperty("user.home");
// Replace all '\\' with '\\\\' (escaping for regex and again for java)
final String escapedUserHome = userHome.replaceAll("\\\\\\\\",
"\\\\\\\\\\\\\\\\");
final Path rootedFile = Paths.get( file.replaceFirst("^~", escapedUserHome)
);
> Rya Shell Windows user.home error
> ---------------------------------
>
> Key: RYA-447
> URL: https://issues.apache.org/jira/browse/RYA-447
> Project: Rya
> Issue Type: Bug
> Components: clients
> Affects Versions: 3.2.12
> Environment: Windows build
> Reporter: Eric White
> Assignee: Eric White
> Priority: Major
> Fix For: 3.2.12
>
>
> When building rya.shell under Windows, loading tests fail due to malformed
> user.home paths. It appears that Windows file separators ('\') are causing
> problems when being used as part of a regex replacement operation since
> they're not being escaped.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)