Bad directory name for xnview.db and category.db

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
Geby

Bad directory name for xnview.db and category.db

Post by Geby »

XnView 1.90.2

Categories and similar features not working here, because here is a bug in code for creating empty Sqlite3 databases.

Files xnview.db and category.db will be stored in users profile inside "Application data" subdirectory. But exact name of this subdirecory is different for each Windows localization language.

For my language is this name "Data aplikací" (last character is 'i' with little comma above)

By ProcessMonitor I see how Xnview try to open not yet existing file, and when failed, try to create new file.. but with broken name in directory path.

You are trying to open file on right path, but if file not exists, you are trying to create new file with broken file name, non-ascii characters are stripped out. In my case, you are trying directory name "Data aplikac", last character is stripped out.

See:

Code: Select all

5861	15:34:58.3338158	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikací\XnView	NAME COLLISION	Access: Read Data/List Directory, Synchronize, Disposition: Create, Options: Directory, Synchronous IO Non-Alert, Attributes: N, ShareMode: Read, Write, AllocationSize: 33 073 545 986 703 360
5862	15:34:58.3341212	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikací\XnView\category.db	NAME NOT FOUND	Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
5863	15:34:58.3343715	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikací\XnView\category.db	NAME NOT FOUND	Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
5864	15:34:58.3346145	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikací\XnView\category.db	NAME NOT FOUND	Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
5865	15:34:58.3348861	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikací\XnView\category.db	NAME NOT FOUND	Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
5866	15:34:58.3351456	xnview.exe	1648	QueryOpen	C:\Documents and Settings\gebauerl\Data aplikací\XnView\category.db	NAME NOT FOUND	
5867	15:34:58.3352356	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikac\XnView\category.db	PATH NOT FOUND	Access: Generic Read/Write, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Random Access, Attributes: N, ShareMode: Read, Write, AllocationSize: 141 020 956 196 864
5868	15:34:58.3353183	xnview.exe	1648	CreateFile	C:\Documents and Settings\gebauerl\Data aplikac\XnView\category.db	PATH NOT FOUND	Access: Generic Read, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Random Access, Attributes: N, ShareMode: Read, Write, AllocationSize: 8 980 037 202 956 255 232
Thank you for fix!
User avatar
xnview
Author of XnView
Posts: 46249
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bad directory name for xnview.db and category.db

Post by xnview »

Geby wrote:XnView 1.90.2

Categories and similar features not working here, because here is a bug in code for creating empty Sqlite3 databases.

Files xnview.db and category.db will be stored in users profile inside "Application data" subdirectory. But exact name of this subdirecory is different for each Windows localization language.

For my language is this name "Data aplikací" (last character is 'i' with little comma above)

By ProcessMonitor I see how Xnview try to open not yet existing file, and when failed, try to create new file.. but with broken name in directory path.

You are trying to open file on right path, but if file not exists, you are trying to create new file with broken file name, non-ascii characters are stripped out. In my case, you are trying directory name "Data aplikac", last character is stripped out.
the 'Applicatino data' path is in unicode :-(
Could you send me a PM with an email, i owuld like to send you a test version?
Pierre.
geby
Posts: 1
Joined: Wed Feb 14, 2007 12:57 pm

Re: Bad directory name for xnview.db and category.db

Post by geby »

xnview wrote: the 'Applicatino data' path is in unicode :-(
Could you send me a PM with an email, i owuld like to send you a test version?
PM sended.

...maybe you are using ANSI instead of unicode somewhere in database creation routines.
Post Reply