Skip to content

Commit

Permalink
feat: change new db name to verdaccio (#83)
Browse files Browse the repository at this point in the history
* feat: change new db name to verdaccio

* feat: change new db name to verdaccio
  • Loading branch information
omerdrukman authored and sergiohgz committed Aug 13, 2019
1 parent faf85e4 commit edfca9f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugins/local-storage/src/local-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,16 @@ class LocalDatabase implements IPluginStorage {
* @private
*/
_buildStoragePath(config: Config) {
return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, '.sinopia-db.json'));
const dbGenPath = function(dbName) {
return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, dbName));
};

const sinopiadbPath = dbGenPath('.sinopia-db.json');
if (fs.existsSync(sinopiadbPath)) {
return sinopiadbPath;
}

return dbGenPath('.verdaccio-db.json');
}

/**
Expand Down

0 comments on commit edfca9f

Please sign in to comment.