summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-01-25 23:08:25 +0900
committerShinya Maeda <shinya@gitlab.com>2018-02-06 15:50:07 +0900
commit0d960fac9115c765896450daf625752f5e9db185 (patch)
tree86c0a42e6d92a77dea06e47ee2f1b66174a65c54 /app/uploaders
parent14d1715610b7df7f8f518a8b57ee4176f208c4a8 (diff)
downloadgitlab-ce-0d960fac9115c765896450daf625752f5e9db185.tar.gz
JobArtifactUploader#open raise execption if its not Filestorage
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/job_artifact_uploader.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/uploaders/job_artifact_uploader.rb b/app/uploaders/job_artifact_uploader.rb
index 8766db94079..841168438d8 100644
--- a/app/uploaders/job_artifact_uploader.rb
+++ b/app/uploaders/job_artifact_uploader.rb
@@ -14,7 +14,9 @@ class JobArtifactUploader < GitlabUploader
end
def open
- File.open(path, "rb")
+ raise 'Only File System is supported' unless file_storage?
+
+ File.open(path) if path
end
private