emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#10733: closed (24.0.93; w32 file truncation)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10733: closed (24.0.93; w32 file truncation)
Date: Fri, 03 Aug 2012 11:08:02 +0000

Your message dated Fri, 03 Aug 2012 13:59:45 +0300
with message-id <address@hidden>
and subject line Re: bug#10733: 24.0.93; w32 file truncation
has caused the debbugs.gnu.org bug report #10733,
regarding 24.0.93; w32 file truncation
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10733: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10733
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.93; w32 file truncation Date: Sun, 5 Feb 2012 14:34:00 -0800
When opening a file on an NTFS file system the file opens as if the
content is truncated to size of 65375 characters.  This happens when
the file is an NTFS symbolic link which is made by mklink command of
cmd.exe.  There is no problem if the target file of the NTFS symbolic
link is smaller than this size.

-Tak

--text follows this line--
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
c:/emacs/emacs-24.0.93/etc/DEBUG.


In GNU Emacs 24.0.93.1 (i386-mingw-nt6.1.7601)
 of 2012-01-29 on TAK-VAIO-Z1290
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.5) --cflags -Ic:/d/pub/emacs/include --ldflags
 -Lc:/d/pub/emacs/lib'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC x f i n d SPC f i SPC <return> m e m o <return> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <next> 
<next> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> ESC : ( p o i n t ) <return> ESC 
: r e p o r t SPC C-g ESC x r e p o r SPC e m SPC SPC 
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
You can run the command `find-file' with C-x C-f
scroll-up-command: End of buffer [21 times]
byte-code: End of buffer [21 times]
65375 (#o177537, #xff5f)
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)




--- End Message ---
--- Begin Message --- Subject: Re: bug#10733: 24.0.93; w32 file truncation Date: Fri, 03 Aug 2012 13:59:45 +0300
> Date: Tue, 07 Feb 2012 19:35:25 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> 
> > From: Óscar Fuentes <address@hidden>
> > Cc: address@hidden,  address@hidden,  address@hidden
> > Date: Tue, 07 Feb 2012 06:22:12 +0100
> > 
> > Eli Zaretskii <address@hidden> writes:
> > 
> > >> Maybe it can be integrated in the
> > >> 
> > >> if (!(NILP(Vw32_get_true_file_attributes) ...
> > >> 
> > >> hence reusing the calls to CreateFile and GetFileInformationByHandle and
> > >> shortening the patch, but as I don't know what
> > >> Vw32_get_true_file_attributes does, preferread to follow the safe way.
> > >
> > > You did right: w32-get-true-file-attributes can be set by the user to
> > > nil, if she wants her file ops faster.
> > 
> > I was thinking on something like
> > 
> > diff --git a/src/w32.c b/src/w32.c
> > index 3d3d334..418be63 100644
> > --- a/src/w32.c
> > +++ b/src/w32.c
> > @@ -3447,8 +3447,12 @@ stat (const char * path, struct stat * buf)
> >     }
> >      }
> >  
> > -  if (!(NILP (Vw32_get_true_file_attributes)
> > -   || (EQ (Vw32_get_true_file_attributes, Qlocal) && is_slow_fs (name)))
> > +  buf->st_size = 0;
> > +
> > +  if ((!(NILP (Vw32_get_true_file_attributes)
> > +         || (EQ (Vw32_get_true_file_attributes, Qlocal) && is_slow_fs 
> > (name)))
> > +       || ((wfd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
> > +           (wfd.dwReserved0 == IO_REPARSE_TAG_SYMLINK)))
> 
> Then what made you hesitate?  This approach looks fine to me.
> 
> > >> if is-symlink?
> > >>   use fstat
> > >> fi
> > >
> > > Since fstat is also reimplemented, I'd rather do what it does inline.
> > >
> > > For that, we need to know which other attributes are reported
> > > different.  Or maybe just test for the reparse point up front and do
> > > all the work for the target instead.
> > 
> > Since Emacs' fstat reimplementation is based on
> > GetFileInformationByHandle, and that the handle points to the linked
> > file (CreateFile follows the link unless told otherwise), we should be
> > safe delegating all work to `fstat' when a symlink is detected on `stat'
> > (the executable bit must be setted on `stat', but that's no problem.)
> 
> Please compare w32.c's `fstat' with `stat', and you will see that the
> former does much less than the latter, even with information that can
> be gotten by the handle.  To go the way you suggest, we need first to
> make `fstat' a proper subset of `stat'.  (I never had time to do it,
> and since `fstat' is used much less that `stat' in Emacs, more
> important jobs came first.)

Since trunk revision 109416 adds full support for symlinks on
MS-Windows platforms, and fixes this bug as a side effect, I'm closing
this bug.



--- End Message ---

reply via email to

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