http://bugs.winehq.org/show_bug.cgi?id=9158
Sjors Gielen dazjorz@dazjorz.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dazjorz@dazjorz.com
nathan.n saturn_systems@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saturn_systems@yahoo.com
--- Comment #19 from Sjors Gielen dazjorz@dazjorz.com 2009-05-24 13:39:23 --- (In reply to comment #18)
I've been thinking about how to handle FILE_ATTRIBUTE_HIDDEN in Wine. In Nautilus (and probably other file managers) you can hide files by creating a file called ".hidden" and listing the names of the files you wish to hide.
Once possible proper fix for this bug (aside from the workaround posted) is to alter create_file (server/file.c) to add an entry to a .hidden file in the destination directory when a file is created with FILE_ATTRIBUTE_HIDDEN set. Then FindFirstFile/FindNextFile could check this file (if it exists) and ignore any files listed.
This should give the behaviour needed without having to rename the files so they are prefixed with a dot.
As far as I can see, '$shtdwn$.reg' is not prefixed with a dot or anything, so that can't be the problem here... Right?
--- Comment #20 from Austin English austinenglish@gmail.com 2009-05-24 14:16:32 --- (In reply to comment #19)
As far as I can see, '$shtdwn$.reg' is not prefixed with a dot or anything, so that can't be the problem here... Right?
The problem is the installer expects the file to be hidden, in the Windows way, e.g., not a '.', but given the hidden attribute, which Wine does not support.
--- Comment #21 from Sjors Gielen dazjorz@dazjorz.com 2009-05-25 15:24:50 --- (In reply to comment #20)
The problem is the installer expects the file to be hidden, in the Windows way, e.g., not a '.', but given the hidden attribute, which Wine does not support.
You said:
This should give the behaviour needed without having to rename the files so they are prefixed with a dot.
I thought this was the way Wine does it now :) What about this: Wine gets (for case insensitivity) a solution like ciopfs: all files are stored in lower case, and then Wine keeps a database file (sqlite or so?) containing the original filename and other non-ext properties, like whether they are hidden. Using SQLite, it wouldn't be too slow; Wine doesn't need to read all files in the directory since the files are lowercase. It only needs to search if the lowercase file does not exist, in which case it does search and if it finds a file, it renames it to lowercase and adds it to the database to speed up future searches; this is necessary to merge from older Wine versions. This solution will only be noticeably slow when an application continuously asks for a non-existent file; and it will be just as slow as the old Wine solution. It will also be backwards compatible, only older versions of Wine will not return the original filename but the lower case one (since they search the whole directory anyway). Any objections, except that SQLite support is needed?
--- Comment #22 from Vitaliy Margolen vitaliy@kievinfo.com 2009-05-25 16:05:44 --- (In reply to comment #21)
Any objections, except that SQLite support is needed?
You forgetting that Wine doesn't have it's own FS. Nothing prevents a program outside of Wine to copy a file into "C:".
Also what about the rest of the root file system (/)?
This can only be supported for files created from within Wine. The actual attributes can be stored in the special hidden file in the same directory (preferred) or the globally (not portable).
--- Comment #23 from Sjors Gielen dazjorz@dazjorz.com 2009-05-25 17:48:39 --- (In reply to comment #22)
(In reply to comment #21)
Any objections, except that SQLite support is needed?
You forgetting that Wine doesn't have it's own FS. Nothing prevents a program outside of Wine to copy a file into "C:".
That's only a real problem as far as that program only writes lowercased files... I think that's an acceptable thing, isn't it?
Also what about the rest of the root file system (/)?
It would just work like wine works now; readdir() I guess. :)
This can only be supported for files created from within Wine. The actual attributes can be stored in the special hidden file in the same directory (preferred) or the globally (not portable).
Ok. I agree the main flaw in the idea (the fact that from outside wine, the case insensitivity isn't enforced) makes it a no-go. I could implement this special hidden file support (or even generally, extra file flag support) in Wine, but it may take a moment since I'm totally not accustomed to Wine's source, I've never seen a bit of it.
If there's anything I should read about the plans related to this before I start, please drop me some links and I'll get coding. (that's apart from the normal stuff a beginning Wine developer should read, I can find those on my own ;) )
--- Comment #24 from Dan Kegel dank@kegel.com 2009-07-30 13:40:43 --- maybe one could use xattr to store a user.wine.hidden attribute with the file... but Ubuntu doesn't ship with /home mounted with user_xattr, so that's not likely to fly any time soon.