dreedyman / Rio

Rio is an open source technology that provides a dynamic architecture for developing, deploying and managing distributed systems composed of services.
Apache License 2.0
21 stars 17 forks source link

add backslash character to Artifact regex; test #37

Closed rafalkrupinski closed 10 years ago

rafalkrupinski commented 10 years ago

new Artifact() called with two or more absolute windows paths (C:\file1;C:\file2) is accepted because of colons separating drive and path. This change adds \ to negative matches.

Perhaps the regex checking for artifacts should consist of positive matches, e.g. [\w\d-] or [\p{L}\d-]

dreedyman commented 10 years ago

Can you explain exactly how this would manifest itself? Passing in 2 or more windows paths just does not seem like something that would ever happen.

rafalkrupinski commented 10 years ago

Artifact.isArtifact() calls new Artifact() and returns true if no exception is thrown. isArtifact() called with multiple windows paths returns true

rafalkrupinski commented 10 years ago

Dennis, would you please integrate this pull request or otherwise fix the problem when isArtifact() is called with windows paths?

dreedyman commented 10 years ago

Awesome, thanks for the patch Rafal