We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faf85e4 commit edfca9fCopy full SHA for edfca9f
plugins/local-storage/src/local-database.js
@@ -246,7 +246,16 @@ class LocalDatabase implements IPluginStorage {
246
* @private
247
*/
248
_buildStoragePath(config: Config) {
249
- return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, '.sinopia-db.json'));
+ const dbGenPath = function(dbName) {
250
+ return Path.join(Path.resolve(Path.dirname(config.self_path || ''), (config: any).storage, dbName));
251
+ };
252
+
253
+ const sinopiadbPath = dbGenPath('.sinopia-db.json');
254
+ if (fs.existsSync(sinopiadbPath)) {
255
+ return sinopiadbPath;
256
+ }
257
258
+ return dbGenPath('.verdaccio-db.json');
259
}
260
261
/**
0 commit comments