fdbozzo / foxbin2prg

Visual FoxPro 9 Binary to Text and Text to Binary converter. Replacement for SCCText(X) and TwoFox that is bi-directional (Text is editable)
https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
MIT License
59 stars 35 forks source link

Bug: Configfile is ignored if foldername has . #86

Closed JoergSchneider closed 2 years ago

JoergSchneider commented 2 years ago

ℹ Computer information

📝 Provide detailed reproduction steps (if any)

  1. In the Main Folder FOXBIN2PRG.CFG with the option DBC_Conversion_Support: 0
  2. In the data.dev Folder FOXBIN2PRG.CFG with the option DBC_Conversion_Support: 2

✔️ Expected result

In the Data.dev Folder the DBC should be converted to db2

❌ Actual result

No db2 File is generated.

If I rename the data.dev Folder to datadev everything works fine. But the Folder has to have the name data.dev

lscheffler commented 2 years ago

It is to be checked if the folder data.dev (with the dot) is touched at all.

lscheffler commented 2 years ago

The following setup works for me:
test.zip and my config next to foxbin2prg.exe: foxbin2prg.zip

Can you test this with DO "Path to\foxbin2prg.prg" WITH 'BIN2PRG','Your path to\test'?

For your folder structure, does it make a difference if you call foxbin2prg like my call above?

Else can you provide an example of your folder structure, this is

Please use an encrypted file an send me the pwd via other line. (POTS / UT)


Please note, the syntax to get the valid settings in a folder is like shown in the doc with an upper -C! Lower -c will generate default.

JoergSchneider commented 2 years ago

See attached ZIP file. With this structure i can reproduce the bug. Configfiles included TestBugmeldungDaten.zip .

lscheffler commented 2 years ago

There is something with databases without tables

Test 1

It is about tables, a stored procedure does not make a difference here.

JoergSchneider commented 2 years ago

First, THX for testing ;) Test 1: I do not get any error Test 2: No, there's no difference if the DBC has a Table or not.

Well, to reproduce, here are my Steps: The ZIP TestBugmeldungDaten.zip unzipped in main Folder (C:\Entwicklung\GIT\TestBugmeldungDaten). VFP startet set default to main Folder then I Start: do Path to\ foxbin2prg.prg with 'BIN2PRG', 'C:\Entwicklung\GIT\TestBugmeldungDaten'

Bug I: no Testdata.db2 File image

Bug II: no TestMetaDate.db2 File image

lscheffler commented 2 years ago

@JoergSchneider, I can see the result for this example.


Please try the following scenarios and let me know the result for both directories

lscheffler commented 2 years ago

I found the problem, it's about evaluating the settings of the current folder. It is, for some reasons, reset if a DBF is within the folder, else not. The last folder with a DBF wins. Because of this I had the non consistent behaviour.

I'm normally testing with Bin 2 Text Extension against a list of files processing file by file, so the settings set to to recent folder every time. Sorry for that, it looks like this is this way as long as settings other then next to foxbin2prg.prg exists.


To circumvent the problem right now, you might run foxbin2prg for each folder single. Then it gathers the right settings. Anyway it depends of the order to run, from root to branches is the only way reliable.#


update: The problem with data.dev vs datadev seems to be a side effect of an order problem. The files are put into an array by some order, possibly from OS and are worked file by file. If it runs like

  1. data.dev\TestData.dbc
  2. data.dev\Metadata\TestMetadata.dbc
  3. data.dev\Metadata\TestTable.dbf

it fails, because the DBF is after the DBC.
If it runs like

  1. datadev\Metadata\TestTable.dbf
  2. datadev\Metadata\TestMetadata.dbc
  3. datadev\TestData.dbc

the DBF would be activate the config of its folder, config activated and DBC converted.

JoergSchneider commented 2 years ago

Yes! Now it works as expected! Thank You!