This commit is contained in:
MattMan
2022-11-06 11:33:55 -05:00
2 changed files with 18 additions and 18 deletions

View File

@@ -3,8 +3,6 @@
The ***wtv minisrv***, or "***zefie_wtvp_minisrv***" project is a node.js project that provides a mini WebTV Server, aiming for full WTVP (WebTV Protocol) support.
This open source server is in beta status. Use at your own risk.
## Note: This is the `dev` branch. It offers more features and bug fixes than `master`. Until the release of v1.0 (and the removal of this message), it is suggested you download from this branch
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
### Current status:

View File

@@ -45,6 +45,7 @@ class WTVRegister {
// check against user accounts
var search_dir = this.session_store_dir + this.path.sep + "accounts";
if (directory) search_dir = directory;
if (this.fs.existsSync(directory)) {
this.fs.readdirSync(search_dir).forEach(file => {
if (self.fs.lstatSync(search_dir + self.path.sep + file).isDirectory() && !return_val) {
return_val = !self.checkUsernameAvailable(username, search_dir + self.path.sep + file);
@@ -62,6 +63,7 @@ class WTVRegister {
console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e);
}
});
}
return !return_val;
}