emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fileio.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c,v
Date: Fri, 18 Apr 2008 02:26:07 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/18 02:26:06

Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.613
retrieving revision 1.614
diff -u -b -r1.613 -r1.614
--- fileio.c    12 Apr 2008 09:13:14 -0000      1.613
+++ fileio.c    18 Apr 2008 02:26:05 -0000      1.614
@@ -1045,6 +1045,7 @@
   /* These point to SDATA and need to be careful with string-relocation
      during GC (via DECODE_FILE).  */
   unsigned char *nm, *newdir;
+  int nm_in_name;
   /* This should only point to alloca'd data.  */
   unsigned char *target;
 
@@ -1158,11 +1159,13 @@
     }
 
   nm = SDATA (name);
+  nm_in_name = 1;
 
 #ifdef DOS_NT
   /* We will force directory separators to be either all \ or /, so make
      a local copy to modify, even if there ends up being no change. */
   nm = strcpy (alloca (strlen (nm) + 1), nm);
+  nm_in_name = 0;
 
   /* Note if special escape prefix is present, but remove for now.  */
   if (nm[0] == '/' && nm[1] == ':')
@@ -1321,6 +1324,7 @@
          if (index (nm, '/'))
            {
              nm = sys_translate_unix (nm);
+             nm_in_name = 0;
              return make_specified_string (nm, -1, strlen (nm), multibyte);
            }
 #endif /* VMS */
@@ -1396,6 +1400,7 @@
              int offset = nm - SDATA (name);
              hdir = DECODE_FILE (tem);
              newdir = SDATA (hdir);
+             if (nm_in_name)
              nm = SDATA (name) + offset;
            }
 #ifdef DOS_NT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]