package com.atlassian.bitbucket.installer.validation;

import java.io.File;

public class PathSpacesValidationStrategy implements DirectoryValidationStrategy {

    @Override
    public void validate(File directory) {
        String absolutePath = directory.getAbsolutePath();
        if (absolutePath.indexOf(' ') > -1) {
            throw new HardValidationException(HardValidationException.ERROR_DIRECTORY_SPACES);
        }
    }
}
