Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
*/
public static String getRelative(FilePath include, FilePath workspace) throws UploadException {
LinkedList<String> segments = new LinkedList<String>();
String includePath = include.getRemote();
include = new FilePath(include.getChannel(), includePath.replace("\\", "/"));
while (!include.equals(workspace)) {
segments.push(include.getName());
include = include.getParent();
if (Strings.isNullOrEmpty(include.getName())) {
if (include == null || Strings.isNullOrEmpty(include.getName())) {

Check warning on line 49 in src/main/java/com/google/jenkins/plugins/storage/util/StorageUtil.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 49 is only partially covered, one branch is missing
// When we reach "/" we're done either way.
break;
}
Expand Down