Catalog directories, folder importation

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

User avatar
xnview
Author of XnView
Posts: 37759
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Catalog directories, folder importation

Post by xnview »

zarlan wrote: Mon May 23, 2022 4:21 pm
xnview wrote: Mon May 23, 2022 8:02 amNo, "c:\" was not set by XnView, the default is '/'
The equivalent of '/', on Windows, is 'C:\'.
'/'='C:\'
NO, not for XnView. On Windows, by default it's '/'
It's the case, when you 'import a folder' or browse folder, excluded/included list is checked
It may be, on your system, but obviously not on mine.
Stop calling me a liar!
i can't reproduce the bug.
Well you clearly haven't tried, to come close to the same conditions, so…
I need more info to be able to reproduce...
Do you use '/' as base path??
There is no '/', in Windows.
If you don't use base path, you need to use '/' EVEN on windows, remove the field from xnview.ini, and you'll see
I mean, how can you develop a program for Windows, if you never at least test it on the OS?
XnView is developed and tested on Windows
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

xnview wrote: Tue May 24, 2022 6:33 amNO, not for XnView. On Windows, by default it's '/'
How? '/' doesn't exist, on Windows. It makes no sense. It would not accomplish anything, other than a syntax error.
I need more info to be able to reproduce...
By your own admission, you haven't applied the info that I have already given.
remove the field from xnview.ini, and you'll see
I closed XnView, checked xnview.ini, found the field "basePath=C:\", removed 'C:\', leaving it as "basePath=", and then restarted XnView.
It showed "Base Path: 'C:\'"
I then closed XnView, and checked the xnview.ini. It still just said "basePath=".
I then tried removing the "basePath=" line entirely, and started XnView.
It still showed "Base Path: 'C:\'" (and closing XnView again, and re-checking the ini, shows the line still missing. I then re-added "basePath=")
In other words:
The default base path, for XnView, on Windows, is 'C:\'.
XnView sets the base path as 'C:\', by default, on Windows.
…and, as I had never set it to 'C:\', that was obvious that this was clearly what XnView had done from the start, unless you assume that I'm a liar.
XnView is developed and tested on Windows
Then you should know, that there is no such thing as '/', on Windows. That it makes no sense, of any kind.
You cannot have a path, that is '/', on Windows. It is completely impossible. Thus, if you use XnView on Windows, you cannot have it as the base path …meaning that the evidence shows that you clearly haven't tried to reproduce this bug, on a Windows system.
User avatar
xnview
Author of XnView
Posts: 37759
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Catalog directories, folder importation

Post by xnview »

zarlan wrote: Tue May 24, 2022 6:59 am How? '/' doesn't exist, on Windows. It makes no sense. It would not accomplish anything, other than a syntax error.
'/' is used by XnView on Windows to represent the computer
remove the field from xnview.ini, and you'll see
I closed XnView, checked xnview.ini, found the field "basePath=C:\", removed 'C:\', leaving it as "basePath=", and then restarted XnView.
It showed "Base Path: 'C:\'"
I then closed XnView, and checked the xnview.ini. It still just said "basePath=".
I then tried removing the "basePath=" line entirely, and started XnView.
It still showed "Base Path: 'C:\'" (and closing XnView again, and re-checking the ini, shows the line still missing. I then re-added "basePath=")
In other words:
The default base path, for XnView, on Windows, is 'C:\'.
There is a problem, i've removed basePath, and i have '/' not 'c:\'. Do you edit the good xnview.ini?? Which settings>Integration>Paths do you have?
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

xnview wrote: Tue May 24, 2022 7:55 amThere is a problem, i've removed basePath, and i have '/' not 'c:\'. Do you edit the good xnview.ini?? Which settings>Integration>Paths do you have?
Hm? I checked, and apparently I did edit the wrong ini-file. (I edited one under user, but it's set to use the ini in the program folder)

So now I edited the correct ini (I also note that it said 'C:/' …which, again, I never set. XnView set that, by default!)
…which did NOT result in the base path being set to '/'
Now there is nothing shown, under base path. No 'C:\', no '/'. Nothing.
After a further closing and restarting of XnView, however, is now says '\' ('/' in the ini-file)
…and a lot of the folders in the list, now have their path starting with '\@', rather than 'C:\', which makes absolutely no sense.
User avatar
xnview
Author of XnView
Posts: 37759
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Catalog directories, folder importation

Post by xnview »

zarlan wrote: Tue May 24, 2022 8:41 am …and a lot of the folders in the list, now have their path starting with '\@', rather than 'C:\', which makes absolutely no sense.
yes because many of your folders use relative path and not absolute path (because of using base path). For a test, Please try with a clean database...
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

xnview wrote: Tue May 24, 2022 8:49 amPlease try with a clean database...
You're asking me to erase tons of painstaking categorization? Forget it!
Hm…
I see that all of the painstaking categorization is gone…
Unless I go back to c:\ as base path.
Nope. That didn't help.

#%WQ¤&¤#Q&"!¤%"&T¤#%#"%!%#"!!!!!11!!!!! :evil:
YOU JUST HAD ME COMPLETELY ERASE ALL OF MY PAINSTAKING CATEGORISATION!!!

I have to redo several days of work!
I can only hope, that all of the information can be rediscovered and re-categorised. (though it will take ages)

Aren't there rules here, against leading people to sabotage/destroy their systems!?
There are rules against being rude, but not against the FAR WORSE sin, of wiping someone's database!?

Edit: …and let's not forget, that the base path issue shouldn't have any impact, on the behaviour of importation and the exclude/include-list, anyway. If it does, then that is obviously a serious bug.
Not to mention the EXTREMELY serious bug, of removing the base path, causing the database be disconnected from the folders/files on the computer, and all associated categories and the like, thereby being rendered completely and permanently unconnected to the files/folders, and thus utterly inaccessible.
User avatar
xnview
Author of XnView
Posts: 37759
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Catalog directories, folder importation

Post by xnview »

I thought you would have done a backup for the test...
zarlan wrote: Tue May 24, 2022 8:56 am I have to redo several days of work!
I can only hope, that all of the information can be rediscovered and re-categorised. (though it will take ages)
In this case put again the base path...
Edit: …and let's not forget, that the base path issue shouldn't have any impact, on the behaviour of importation and the exclude/include-list, anyway. If it does, then that is obviously a serious bug.
Not to mention the EXTREMELY serious bug, of removing the base path, causing the database be disconnected from the folders/files on the computer, and all associated categories and the like, thereby being rendered completely and permanently unconnected to the files/folders, and thus utterly inaccessible.
yes the relative paths are no more connected to absolute paths. I'll check with base path & excluded/included paths

You can send me the .db, and i can change that... or if you know SQL?
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

xnview wrote: Tue May 24, 2022 9:36 amIn this case put again the base path...
I already stated, that I already did that, and that it didn't do anything!
yes the relative paths are no more connected to absolute paths.
That makes absolutely no sense, of any kind. There is no possible reason, for why they wouldn't be connected.
or if you know SQL?
I wish. I do intend to, eventually, learn SQL …and create my ideal database, where I can tag stuff in a far superior manner. (going well beyond the purposes of XnView, in that area)

I'm not entirely sure, if I am able to send the database, but I'll try.
Edit: (it seems to have been possible, with a bit of a workaround)
Edit2: Nope. Apparently the workaround that was supposed to work, absolutely did not …and I can't send an e-mail attachment of ~50MB…
User avatar
xnview
Author of XnView
Posts: 37759
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Catalog directories, folder importation

Post by xnview »

zarlan wrote: Tue May 24, 2022 10:13 am
xnview wrote: Tue May 24, 2022 9:36 amIn this case put again the base path...
I already stated, that I already did that, and that it didn't do anything!
i'll check your .db, but really strange if the database is not changed...
yes the relative paths are no more connected to absolute paths.
That makes absolutely no sense, of any kind. There is no possible reason, for why they wouldn't be connected.
only a relative path is stored in the database not absolute, you should not change method once database is created. I'll add a warning when changing base path... Many users would like to have only relative paths to be able to browse on multiple computers...
Pierre.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

If you know of a way for me to send the database to you, I'd love to hear about it.
E-mailing it didn't work through my e-mail client, so I tried logging in to the webmail interface, where I was told that it was too big
…but the webmail told me, I could send it using the cloud storage service, that comes along with the e-mail account
…which also didn't work, for some inexplicable reason. (it took ages to load, consistent with it needing to upload the file, and then created a link to it …except that it was a link to nothing, and no database file was uploaded to the storage)
xnview wrote: Tue May 24, 2022 11:52 amonly a relative path is stored in the database not absolute
How is that relevant, to the issue of connecting folder importation and the "Excluded/Included" list?
Figuring out the absolute path, of relative paths, is about as easy a thing as you could possibly do, for a computer program. (using the same methods as a simple search-and-replace)
So there is no reason for there to be any problems, with figuring out the which folders one browses, that are in the "Excluded/Included" list, due to one having absolute paths and the other having relative ones, or anything like that.
you should not change method once database is created.
…which is EXACTLY what YOU TOLD ME to do!
Despite knowing full well, that doing so ruins the database!
Many users would like to have only relative paths to be able to browse on multiple computers...
Including me, but I have been told, that XnView only uses absolute paths, making that impossible.
…and the fact that the paths shown, in the "Import folder" tab, are all absolute, re-enforced that notion.
Relative paths should always be shown as relative.

However, having one single base path, for relative paths, means that it is only possible to catalogue files/folders, that one puts in a specific base folder, and nothing else.

Having the option to set multiple "base path"s (which, being multiple, should maybe have a different name), which can be given different names, where you can then change their "base path"s, when copying the database to another computer…
The paths (along with the names) of the "base path"s being stored, in the ini-file, and the relative paths (using the base path names) being stored in the database.
(and if a base path isn't used, then no base path should be set or shown, but instead say something along the lines of "none" or "only absolute paths")

So that, e.g., if you have "base paths" named (to choose some random names) "Pony" and "*bUrn", you could have a list of imported folders like this:
\@Pony\folder1\folderB
\@Pony\folder1\
C:\Random
\@bUrn\folder1
\@bUrn\folder2
\@bUrn\

…and also have the option to change paths from absolute to relative, or relative to absolute.
So if "Pony" is "C:\AAA", then changing "Pony" to absolute, would mean replacing the "\@Pony" with "C:\AAA" (for both the folder, as well as any and all files in it)
…and if one wants to make "C:\Random" into a relative path, you'd get a dialogue that tells you to input a name for that relative path, and then change "C:\Random" to "\@[whatever name you inputted]"
Again: This is all very simple and easy. A simple search and replace.
In fact, rather than adding a warning, when changing the base path, why not simple have XnView do a search-and-replace of the paths, to make sure that the paths are correct?
So that, when changing from "c:\" to "\", it would change any paths with "\@" to "c:\", so that they are correct, under the new base path. (naturally, this can't be done, if the ini-file is manually changed, but… (hence a warning about this, in the ini-file, would be advisable))
Or if the base path is "c:\images", and one changes it to "\", then "\@" would be replaces with "c:\images", so that "\@pic.png" would become "c:\images\pic.png".

…and also use those same relative paths (alongside absolute paths), in "Excluded/Included".
Speaking of "Excluded/Included":
What purpose does "Included" in "Excluded/Included" serve?
I suppose it's necessary to include a subfolder to a folder that is listed as excluded, but does it have any other purpose?
Actually, why not change the "Excluded/Included", so that there is a setting for whether or not a folder is included/excluded by itself, or recursively, and then set it so that XnView checks the list, before it decides to import any files/folders, with an option (in the "Excluded/Included" tab) of whether or not one wants to allow XnView to automatically import folders that aren't added as included.

That way, no files/folders would get automatically imported, outside of those under the paths one specifies in the "Excluded/Included" …unless you check the option of treating any non-excluded folders, as included, that is. (thus letting XnView import folders in the same way that it is currently supposed to)
If you do it like that, then the import folder list would serve to tell you what folders have been imported into the catalogue, and the size
…but the "Excluded/Included" list would be where you decide what folders get imported.

This would also perfectly solve the issue, mentioned in viewtopic.php?f=60&t=43241
It's not completely ideal.
As long as you only make changes to one at a time, and copy to the next computer you use, there's no problems, but if you make separate changes, to the databases of two or more different computers, replacing one file with another would mean gaining some changes, but erasing others.
…but for a single person using multiple computers with XnView (copying a database between them), it should work out decently well.

Though I still think the folder-sidecar idea, would be a good additional option, regardless, for exporting part of a database.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

Well, now the wiped database issue has thankfully been solved. (which was just that "c:\" wasn't recognized as being the same as "C:\", for some reason)
That's quite the relief…
(though now I have a massive amount of duplicate folders, in the imported folders list… A lot of unnecessary cluttering, of the database)

…and Excluded still doesn't work, the way it's supposed to.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

…and I note that several folders that I have never browsed (the recycle bin, and some folders under "user", and some others)
…and as I updated my exclusion list, with more folders, and deleted all those folders I don't want in the catalog, I notice that they come back in the list.
Instantly!
Without me even having browsed anywhere, at all.
zarlan
Posts: 86
Joined: Thu Apr 14, 2022 10:33 am

Re: Catalog directories, folder importation

Post by zarlan »

I have noticed that the Excluded/Included list, is in the ini-file. (and the import-list is obviously based on the database)
Interesting, and sensible.
There should also be an option, in the same tab as the import-list, to remove folders that are in the exclude-list.