Alexandre Julliard wrote:
Dan Kegel dank@kegel.com writes:
I agree that faking network mounts is a good thing, but parsing mtab makes for much easier configuration. Instead of forcing the user to add a server field, wine can figure it out itself. Isn't that a good thing? Why force the user to enter in duplicate info?
Because you have to enter all the info for the drive configuration anyway. I agree doing everything dynamically would be better, but it's a lot more complex. An ugly hack to parse /etc/mtab just for smb mounts doesn't really seem better or easier to understand than having to put this info in the drive config.
Just how terrible is parsing /etc/mtab? It doesn't look like much code. I'd be happy to provide a nice OO wrapper object for it if that would make you happier. It would then no longer be an ugly hack. Would that satisfy you? Or are you fundamentally opposed to it for some other reason than code clarity?
And about ease of use. Consider my application: I wanted to run SourceSafe, so I set up a file in /etc/rc.d to perform the needed smbmount, edited .wine/config to map a drive letter to the mounted smb volume, and wrote a shell script to invoke sourcesafe. All is well except that the darn master ss.ini has a UNC in it that is used only at the very end of a checkin to log the activity; thus my checkins work, but aren't logged, which is eventually going to annoy my boss. With the UNC/mtab hack, things would magically start working properly. With your proposed change, I'd have to go into .wine/config *again* and enter in a duplicate copy of the server and share name, which would be annoying, especially if anything changed; maintaining duplicate info is a pain. Do you disagree? Perhaps you enjoy maintaining duplicate tables by hand?
Now, I can imagine something that would make us both happy, namely for native Windows approaches to persistant drive letter mapping to actually work, getting rid of the need for editing .wine/config at all. But that's a lot of work; you'd need to link a userspace smb client into wineserver, I think.
- Dan