|
From: SourceForge.net <no...@so...> - 2004-09-09 18:03:44
|
Bugs item #875440, was opened at 2004-01-12 15:37 Message generated for change (Comment added) made by michaelbeaver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=875440&group_id=25576 Category: Installation and Environment Group: None Status: Open Resolution: None Priority: 5 Submitted By: Herve Quiroz (hquiroz) >Assigned to: Devon Jones (soulcatcher) Summary: Exception thrown when filepaths.ini is read-only Initial Comment: On Linux/BSD systems, PCGen is sometimes installed as part of the system. When it is the case, users may not write to PCGen distribution files, such as filepaths.ini or any other file in PCGen "home directory". I will speak of the FreeBSD PCGen package as an example. I had to modify the the pcgen.sh script and filepaths.ini so "pcgen.filepaths" is hardcoded to "user". This runs fine... until PCGen shuts down. When PCGen shuts down it tries to write down some stuff in filepaths.ini and that causes a non-fatal Exception to be thrown. IMHO, whenever "pcgen.filepaths" is set to "user", PCGen should not write in any file from PCGen home. Excepted obvioulsy when user specifically changes the value of "pcgen.filespaths". BTW, the 'characters' directory should be relative to "pcgen.filepaths" for the same reason. ---------------------------------------------------------------------- >Comment By: Michael Beaver (michaelbeaver) Date: 2004-09-09 18:03 Message: Logged In: YES user_id=23904 Verified. PCGen throws an exception when it cannot write to the .ini files. Not sure this is a bug. Seems to be more of a FREQ since it appears to work as designed. Devon - Comments? ---------------------------------------------------------------------- Comment By: Herve Quiroz (hquiroz) Date: 2004-06-28 17:42 Message: Logged In: YES user_id=607612 This is still a valid tracker item... PCGen 5.7.1 still produces exceptions when the user exits: Could not find /usr/local/share/java/pcgen/docs/tabpages/source/sourcesectionheading.html Can't write filepaths.ini file java.io.FileNotFoundException: /usr/local/share/java/pcgen/filepaths.ini (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:70) at pcgen.core.SettingsHandler.writeFilePaths(SettingsHandler.java:2571) at pcgen.core.SettingsHandler.writeOptionsProperties(SettingsHandler.java:2600) at pcgen.gui.PCGen_Frame1.handleQuit(PCGen_Frame1.java:1959) at pcgen.gui.PCGen_Frame1.exitItem_actionPerformed(PCGen_Frame1.java:1857) at pcgen.gui.PCGen_Frame1.access$700(PCGen_Frame1.java:134) at pcgen.gui.PCGen_Frame1$7.actionPerformed(PCGen_Frame1.java:2541) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:289) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113) at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at pcgen.gui.PCGen_Frame1$WaitCursorEventQueue.dispatchEvent(PCGen_Frame1.java:3098) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I will update the FreeBSD port to 5.7.2 just to check things... ---------------------------------------------------------------------- Comment By: Paul W. King (kingpaul) Date: 2004-05-31 10:26 Message: Logged In: YES user_id=277877 Is this still a valid tracker? Paul W. King OGL SB, PL Chimp, Data Tamarin, TM Lemur, BoD ---------------------------------------------------------------------- Comment By: Herve Quiroz (hquiroz) Date: 2004-04-09 16:21 Message: Logged In: YES user_id=607612 Sorry for the lack of updates. Actually the monitoring feature from SF.net doesn't seem to work anymore for me... Well, I am quite overwhelmed currently but I will perform a quick CVS checkout and put a statement in my ever-growing TODO list. Hopefully I will submit something in a few weeks, probably not before (unless of course I manage to implement this at first try, tonight for instance). ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2004-02-12 20:01 Message: Logged In: YES user_id=252169 hquiroz, that would be cool! Have you thought about joining PCGEN as a coder? We always have need of coders inhte installation and environment areas. K - TM SB ---------------------------------------------------------------------- Comment By: Herve Quiroz (hquiroz) Date: 2004-01-20 13:40 Message: Logged In: YES user_id=607612 BTW, speaking of other paths (custom sources, output sheets, characters), have you ever considered a sort of "unified", virtual filesystem ? With such a thing, you may say that "customsources" directory is the union of $USERHOME/.pcgen/customsources and $PCGENHOME/customsources, with preferably user home directory files first. Thus, when you list files from your virtual "customsources" directory, you get files from both directory. This would help dealing with "standard" and "custom" output sheets for instance. Indeed, in the current version of PCGen, you need to copy "standard" output sheet files in your personal outpusheets directory if you want to be able to switch quickly between output sheets (using you own HTML ouputsheets but PCGen's PDF ones for example). When a file is present in both directories, the one from user's home directory is used (but such a behaviour could be set through some configuration entry). I realize that this could get applied to configuration files and directories by the way... I may have already coded something in Java. I will have look at it and see if I can put a licence statement in it and release it as a small (well rather tiny) library so you may use it if you want. ---------------------------------------------------------------------- Comment By: Herve Quiroz (hquiroz) Date: 2004-01-20 13:24 Message: Logged In: YES user_id=607612 In my opinion, a good method would be to do as many other apps do: use user's home directory in any case. But then the first thing PCGen would look at when reading configuration from user's home directory is the value of "pcgen.filepaths" so it knows whether it has to continue reading from user's home directory or switch to PCGen's home directory. That's obvious: user's home directory will eventually be writeable while PCGen's home directory may be read-only. This way, no need to patch shell scripts for *BSD and Linux ports of PCGen. Starting PCGen for the first time, a user will get asked whether he prefers to store his data in his own home directory or in PCGen's home directory just like with the current version of PCGen. However this question dialog will not appear if PCGen's home directory (or the configuration file from this directory) is read-only and the answer will get writen in the configuration file from user's home directory rather than PCGen's one. What do you think of this ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=875440&group_id=25576 |