[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  mushclient_prefs.sqlite
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

mushclient_prefs.sqlite

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Tue 28 Apr 2009 01:55 PM (UTC)
Message
Ok... so for some reason whenever I click a shortcut to mushclient it will put "mushclient_prefs.sqlite" in the folder with the shortcut... Is there any way I can get this to just default to the mushclient directory? I'm a little anal and these files are just popping up everywhere, lol.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #1 on Tue 28 Apr 2009 03:20 PM (UTC)
Message
Sounds nasty. I'm unhappy with MUSHclients attitude to the current directory as a whole though - it can be changed by plugins, the user, shortcuts... before starting or while MUSHclient is running. It has caused quite a few silly issues in the past with other things that I can recall. It would be great if this path could be picked a bit more sensibly (read: intuitively correct). :D
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #2 on Tue 28 Apr 2009 05:59 PM (UTC)
Message
Yeah, I have to agree.

I remember this: http://www.gammon.com.au/forum/?id=8170

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #3 on Wed 29 Apr 2009 04:44 AM (UTC)
Message
Change the properties of your shortcuts. Specifically, the "Start In" field.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #4 on Wed 29 Apr 2009 04:47 AM (UTC)
Message
That's a bandaid though. The preferences file should NEVER appear anywhere else than the global spot it should be in.
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #5 on Wed 29 Apr 2009 04:59 AM (UTC)
Message
But the flexibility allows for per user installs, branded mud-sponsored clients, portability...

[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Wed 29 Apr 2009 05:30 AM (UTC)
Message
The directory changes because of the file open dialog box. If it didn't change, every time you navigate to a new directory, it won't remember it, which would be very annoying if you wanted to load lots of (say) plugins from a non-standard location.

Maybe internally it could save and restore the current directory just for the file dialog box, that might work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #7 on Wed 29 Apr 2009 06:20 AM (UTC)
Message
@ WillFa:

You can get the same flexibility with a few simple checks. Installed under Program Files? Use profile directory. Installed in another path? Use the same directory as the executable is in.

Or use a commandline option -p to denote portability (meaning use directory with executable). Or perhaps the simple existance of a 'portable' file in the directory with the executable.

There's a lot of ways to tackle these issues without the current directory coming into it. For scripting, the current directory is simply a monster that tends to do what (especially more novice scripters) don't expect.

@ Nick Gammon:

Oh, I agree, it is useful to have it stay on the same directory for the FO/FS dialog boxes. My point is more-so that the current directory has been used as a defacto standard for many scripting-related things in the past - something that has taken a number of suggestions to get alternatives for. The link Zeno gave comes to mind, I recall participating in a topic or two about the <include> directive and ways to make Lua 'require' use the plugins directory rather than the current working directory.

I think there's been a few more places the current directory caused behaviour people simply did not expect, while I recall you have for a long time advocated the use of changing the current directory to 'fix' these issues. For example, ChangeDir() was added for that precise purpose:

Quote:
This lets you change the current working directory used by MUSHclient. This is useful for situations (like plugins) where you want to load files relative to the plugin location but are unsure if the working directory is at the plugin location. eg.

ChangeDir (GetInfo (66)) --> ensure directory is MUSHclient.exe directory

Note that some actions (like opening world files) may change the directory (eg. to the world file directory) as a side-effect.


I realize these are design issues you never thought of when first writing MUSHclient, and I'm not at all blaming you since I love the client. But it is yet another situation of the current working directory wreaking havoc - which is why I brought it up. I'd like for the CWD to have no effect on the application to avoid the unexpected behaviour it has caused in more than one situation. :)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Wed 29 Apr 2009 07:37 AM (UTC)
Message
I am inclined to agree with you Worstje - the current directory is indeed a monster. In simple programs the current directory is fine to find its data files, and servers even (like Smaug) can assume that their files are relative to the current directory, which they never change.

I vaguely recall there was an operating system which did not have the concept of a current directory (maybe VMS). That would avoid all those issues!

Meanwhile, it is hard to avoid the problem. To force things like require (or include) to assume a particular directory would annoy people who have gone to the trouble of changing the current directory. To not change the current directory when you browse for files would also be annoying.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #9 on Wed 29 Apr 2009 11:24 AM (UTC)
Message
Hrm.. perhaps this is going to sound stupid.. but who would change the current directory in MUSHclient to require something? If it is through opening a file, that's a side-effect people have taught themselves because it works that way (which would in essence mean it is something that NEEDS fixing). If they do it through the script call, I think different default settings for various components might be a better bet.

For example, in shell scripts I see the usefulness of using the current directory in the search path. In plugins in MUSHclients case, I do not see such a use, and using the plugin path as a substitute would be a better idea.
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #10 on Wed 29 Apr 2009 06:34 PM (UTC)
Message
The PDP-11 didn't have a current directory, because it only had a flat file system.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #11 on Thu 30 Apr 2009 03:42 AM (UTC)

Amended on Thu 30 Apr 2009 03:43 AM (UTC) by Twisol

Message
http://www.gammon.com.au/forum/bbshowpost.php?id=6316

This is also a problem related to the current directory, I think. With require(), the directory it uses when loading plugins on MUSHclient startup is different from the one it uses during everyday reinstalls/enables.

Would be -very- nice to see this fixed!

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,146 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]