Dan Kegel dank@kegel.com writes:
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?
Code clarity is one thing (it should be probably using getmntent and friends), performance is another (parsing /etc/mtab on each CreateFile is *not* a good idea), but mainly I'm opposed to the concept of configuring everything by hand except magically getting smb shares through /etc/mtab, when they may not at all reflect what you want the Windows application to see. It doesn't fit in the current configuration philosophy. Now of course the config philosophy can be changed, but it must remain coherent.
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?
I don't doubt it works just fine for your specific case; but it would make things a lot more mysterious and harder to understand. And it would require people who don't want Wine to access their shares to edit their config to prevent trouble. I think it's much better to require people who want it to make the minimal effort of adding a line in the config, instead of making people who don't want it do extra troubleshooting.