Fix the build package path handling

This commit is contained in:
Joseph Schorr 2014-03-05 18:04:01 -05:00
parent 9a733a7320
commit 256503ca75
2 changed files with 5 additions and 5 deletions

View file

@ -825,8 +825,8 @@ function BuildPackageCtrl($scope, Restangular, ApiService, $routeParams, $rootSc
if (dockerfileFolder[0] == '/') {
dockerfileFolder = dockerfileFolder.substr(1);
}
if (dockerfileFolder[dockerfileFolder.length - 1] == '/') {
dockerfileFolder = dockerfileFolder.substr(0, dockerfileFolder.length - 1);
if (dockerfileFolder && dockerFileFolder[dockerFileFolder.length - 1] != '/') {
dockerfileFolder += '/';
}
dockerfilePath = dockerfileFolder + 'Dockerfile';

View file

@ -37,9 +37,9 @@
<div class="tab-content">
<!-- Dockerfile view -->
<div class="tab-pane active" id="dockerfile">
<div class="dockerfile-path">{{ dockerFilePath }}</div>
<div class="dockerfile-view" contents="dockerFileContents"></div>
<span ng-show="!dockerFileContents">No Dockerfile found in the build pack</span>
<div class="dockerfile-path" ng-if="dockerFileContents">{{ dockerFilePath }}</div>
<div class="dockerfile-view" contents="dockerFileContents" ng-if="dockerFileContents"></div>
<span ng-if="!dockerFileContents">No Dockerfile found in the build pack</span>
</div>
<!-- File tree -->