#2809 Local files do not get restored if "restore remote" is off

closed-fixed
Alan Ezust
5
2007-02-07
2007-02-07
daniel hahler
No

When I restart jEdit, previously opened files do not get restored.

I have "Restore previously open files on startup" checked, but not the new option "... including remote files over VFS".

If I check the "... including remote files over VFS" the files get restored - although they are _not_ remote files.

This happens both on Windows and Linux with Sun Java 1.6.

Assigning to Alan, because he introduced this new feature in r8810:
"""
- GeneralOptionPane - new checkbox (restore remote files on startup)
(Alan Ezust).
""" (see http://sourceforge.net/tracker/index.php?func=detail&aid=1645528&group_id=588&atid=350588\)

The following patch seems to fix it. I've not really debugged it. Maybe it's "just" a problem with Java 1.6:
Index: org/gjt/sp/jedit/PerspectiveManager.java
===================================================================
--- org/gjt/sp/jedit/PerspectiveManager.java (Revision 8910)
+++ org/gjt/sp/jedit/PerspectiveManager.java (Arbeitskopie)
@@ -331,6 +331,10 @@
String protocol = MiscUtilities.getProtocolOfURL(uri);
if (protocol.equals("file")) return false;
}
+ else
+ { // Local files do seem to have an empty uri
+ return false;
+ }
return true;
}

Discussion

  • Alan Ezust
    Alan Ezust
    2007-02-07

    Logged In: YES
    user_id=935841
    Originator: NO

    oops! fixed. thanks --alan

     
  • Alan Ezust
    Alan Ezust
    2007-02-07

    • status: open --> closed-fixed