GitHub/Gitlab/Gitea savers: Handle empty paths correctly

Fixes #4656
This commit is contained in:
jeremy@jermolene.com 2020-08-28 15:28:34 +01:00
parent 918e52b37b
commit 8497e5b95d
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ GiteaSaver.prototype.save = function(text,method,callback) {
"Authorization": "Basic " + window.btoa(username + ":" + password)
};
// Bail if we don't have everything we need
if(!username || !password || !repo || !path || !filename) {
if(!username || !password || !repo || !filename) {
return false;
}
// Make sure the path start and ends with a slash

View File

@ -34,7 +34,7 @@ GitHubSaver.prototype.save = function(text,method,callback) {
"Authorization": "Basic " + window.btoa(username + ":" + password)
};
// Bail if we don't have everything we need
if(!username || !password || !repo || !path || !filename) {
if(!username || !password || !repo || !filename) {
return false;
}
// Make sure the path start and ends with a slash

View File

@ -34,7 +34,7 @@ GitLabSaver.prototype.save = function(text,method,callback) {
"Private-Token": password
};
// Bail if we don't have everything we need
if(!username || !password || !repo || !path || !filename) {
if(!username || !password || !repo || !filename) {
return false;
}
// Make sure the path start and ends with a slash