Skip to content

Commit

Permalink
Merge remote-tracking branch 'janekptacijarabaci/scriptName_suffixDb'
Browse files Browse the repository at this point in the history
Fixes #2400
  • Loading branch information
arantius committed Aug 2, 2016
2 parents 8dc54eb + 2674c19 commit 53f5220
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/remoteScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ RemoteScript.prototype.install = function(aOldScript, aOnlyDependencies) {
var suffix = 0;
var file = GM_util.scriptDir();
file.append(this._baseName);
while (file.exists()) {
// See #2400
while (file.exists() || (file.leafName.substr(
file.leafName.length - 3).toLowerCase() == ".db")) {
suffix++;
file = GM_util.scriptDir();
file.append(this._baseName + '-' + suffix);
Expand Down

0 comments on commit 53f5220

Please sign in to comment.