Hi, I am getting some weird problem on windows (xp-p2).
I will try to explain (sorry for my bad english).

I set explorer default action for .sql to open with SciTE, ok that
works great when the the full path to file doesnt contain any
white spaces. But when the file is on desktop for example,
SciTE can not find the file and opens a blank document
(like new file is being created) and when I try to save
it says that could not save file
'C:\Documents and Settings\degz\Desktop\Settings\degz\Desktop\1.sql'

I have also put a shortcut in my SendTo folder pointing to
c:\windows\notepad.exe (I overwrite notepad.exe with scite.exe)
and this way it works ok with any file including spaces in it's
name.

In version 1.70 I patched win32\SciTEWin.cxx and fixed the
problem, I think it would be fixed in newer versions. Sorry
for not reporting this before if it is really a bug.

Here is what fixed the problem in v1.70 (have not tested in 1.71)

----------------------------------------------------------------
diff U7 win32\SciTEWin.cxx win32\SciTEWin.cxx
--- win32\SciTEWin.cxx    Thu Apr 27 18:51:10 2006
+++ win32\SciTEWin.cxx    Mon Aug 14 08:34:00 2006
@@ -1074,14 +1074,20 @@
  * Break up the command line into individual arguments and strip double
quotes
  * from each argument.
  * @return A string with each argument separated by '\n'.
  */
 SString SciTEWin::ProcessArgs(const char *cmdLine) {
     SString args;
     const char *startArg = cmdLine;
+
+    /* check wether full cmdline are just a filename -DegZ */
+    if (access (cmdLine, 0) == 0) {
+        args.appendwithseparator(cmdLine, '\n');
+        return args;
+    }
+
     while (*startArg) {
         while (IsASpace(*startArg)) {
             startArg++;
         }
         const char *endArg = startArg;
         if (*startArg == '"') {    // Opening double-quote
             startArg++;
----------------------------------------------------------------


Thanks in advance for any idea on fixing this,

-- 
-- - Diogo Eduardo Gonçalves Zulli

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to