Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix broken dot-file upload.
Browse files Browse the repository at this point in the history
Summary:
`Path::getFileName` returns another Path object. `Path::startsWith` returns true only if
argument matches the full root component of the Path. We need filters on the string.
#accept2ship

Test Plan: CI, Ran distributed build with local version and verified it's picking up the files.

Reviewed By: ruibm

fbshipit-source-id: c4a7d00
  • Loading branch information
shivanker authored and facebook-github-bot committed Mar 2, 2017
1 parent 5281ac2 commit e6c81cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/com/facebook/buck/distributed/DistBuildService.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,12 @@ public ListenableFuture<Void> uploadBuckDotFiles(
executorService.submit(() -> {
List<Path> buckDotFilesExceptConfig = Lists.newArrayList();
for (Path path : filesystem.getDirectoryContents(filesystem.getRootPath())) {
String fileName = path.getFileName().toString();
if (!filesystem.isDirectory(path) &&
!filesystem.isSymLink(path) &&
path.getFileName().startsWith(".") &&
path.getFileName().toString().contains("buck") &&
!path.getFileName().startsWith(".buckconfig")) {
fileName.startsWith(".") &&
fileName.contains("buck") &&
!fileName.startsWith(".buckconfig")) {
buckDotFilesExceptConfig.add(path);
}
}
Expand Down

0 comments on commit e6c81cb

Please sign in to comment.