Data folder problem with nbi files on two drives

Technical support and discussion of Newsbin Version 6 series.

Data folder problem with nbi files on two drives

Postby Calahan » Tue Oct 11, 2016 9:23 pm

Hello,

I installed Newsbin to drive C: (C:\Program Files\Newsbin\).
Because of several reasons, I needed to split my data folder and my newsbin.ini in two versions.
So I have one newsbin.nbi (I:\Newsbin\newsbin.nbi) with data folder setup to DataPath=I:\Newsbin\Data\ and
the second newsbin.nbi (Q:\Newsbin\newsbin.nbi) with data folder setup to DataPath=Q:\Newsbin\Data\.
The version from drive I: downloads to DownloadPath=I:\ and the version from drive Q: downloads to DownloadPath=Q:\.
(When I start the file I:\Newsbin\newsbin.nbi the registry entry "LastNBI" points to "I:\Newsbin\newsbin.nbi".)
When I start the version from I:, I see the subscribed groups of that version and when I open the version from Q:, I see the other groups that are in that version.
Now the problem:
When I open a group in version from I: (started I:\Newsbin\newsbin.nbi) and download some files, they were downloaded to I:\, that was correct BUT the updates of the group (the headers) were going to Q:\Newsbin\Data\Import and were then imported to Q:\Newsbin\Data\spool_v6\group-name.
I think, the headers should have gone to I:\Newsbin\Data\Import and should have been imported to I:\Newsbin\Data\spool_v6\group-name.
I searched through the registry and found no reference to Q:\Newsbin\Data. The Newsbin.ini from I: also has no reference to Q:.
I think, I made no mistake. What is going wrong here?
Oh yes, version is up to date (6.72 - Build:4776).

All the best,
Calahan
Calahan
Seasoned User
Seasoned User
 
Posts: 124
Joined: Wed May 15, 2013 11:14 am

Registered Newsbin User since: 01/14/12

Re: Data folder problem with nbi files on two drives

Postby Quade » Tue Oct 11, 2016 10:19 pm

1 - The folder the NBI file is in...means nothing. You can put them in any folder on any drive. You can even have them in the same folder call it "Nbis" in your documents folder.

2 - The actual data folder that defines where the data is located is defined in each NBI.

[SETTINGS]
DataPath=X

Which you already seem to know about.

3 - If you want to start Newsbin with different NBI files, you should create two shortcuts to the EXE file and then pass the NBI in the command line to Newsbin. You can even run them at the same time if you want.

4 - If you edit the NBI file while Newsbin is running, when Newsbin exits it'll probably over-write your changes.

It sounds to me like you need to re-check the NBI's and make sure the correct one is getting used when you think it is. Using the command line of a shortcut is the best way to ensure this. It's also possible that an existing, running Newsbins somehow being triggered to read the NBI so, you end up with a mix of settings in the program. It's just a guess though. I think you're better off using the shortcut method. I've never tested executing an NBI while Newsbin is running or starting Newsbin the way you are.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Data folder problem with nbi files on two drives

Postby Calahan » Wed Oct 12, 2016 3:45 am

Hello Quade,

I re-checked the file I:\Newsbin\newsbin.nbi and what a surprise (no not really a surprise anymore) it pointed to Q:\Newsbin\Data.
I thought I made no mistake, because I saw the correct groups. But now I realize, the groups are coming from the ini file, the same with the download path.

I made several tests with starting one first then the other and the other way round. Closing the first started Newsbin and then the second and also the the other way round.
In none of any of my tests the DataPath was overwritten with a wrong path. Starting the nbi file, instead of using shortcuts, works as it should. I think there is no need for shortcuts.
Starting only a nbi file is doing the same as a shortcut. It starts Newsbin from C: with the parameter (%1) of the started nbi file.

I'm really sure no Newsbin instance was running, when I edited the 2 nbi files and I couldn't re-create the change of the DataPath.
I think the only possible solution to my problem is, I made a mistake when creating and updating the nbi files.
I know I changed the DataPath to Drive I: (I'm sure) but I think, I possibly copied settings from my nbi file from Q: afterwards, which overwrote my first correction of the DataPath.
I also think there would be no reason for Newsbin to save the DataPath variable when exiting. I think it never does and never should. But only you know if Newsbin would do such a thing.

Problem solved. Thanks for your help, Quade. :)

All the best,
Calahan
Calahan
Seasoned User
Seasoned User
 
Posts: 124
Joined: Wed May 15, 2013 11:14 am

Registered Newsbin User since: 01/14/12

Re: Data folder problem with nbi files on two drives

Postby Quade » Wed Oct 12, 2016 7:06 am

I also think there would be no reason for Newsbin to save the DataPath variable when exiting. I think it never does and never should. But only you know if Newsbin would do such a thing.


The whole NBI file gets re-written when it's saved. If you change the file while Newsbin is running, then exit Newsbin the old configuration that's on disk gets renamed and a new NBI is written. So, while you cant change the data folder from within Newsbin, it you manually change it, then Newsbin saves on exit, your data folder changes will still get lost.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Data folder problem with nbi files on two drives

Postby Calahan » Wed Oct 12, 2016 7:34 am

Thanks for clarification. So one have to be cautious when editing a nbi file when the Newsbin instance is still running.
If all instances are closed there shouldn't arise any problem with the DataPath, because it's only rewritten and not changed from the instance.

Thanks again, Quade.

All the best,
Calahan
Calahan
Seasoned User
Seasoned User
 
Posts: 124
Joined: Wed May 15, 2013 11:14 am

Registered Newsbin User since: 01/14/12

Re: Data folder problem with nbi files on two drives

Postby Quade » Wed Oct 12, 2016 11:59 am

The takeaway should be that editing the NBI while Newsbin is running won't buy you anything.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97


Return to V6 Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests