PRB: Files Truncated One Byte When Placed in SourceSafe (129187)



The information in this article applies to:

  • Microsoft Visual SourceSafe for Windows 4.0
  • Microsoft Visual SourceSafe for Windows 5.0
  • Microsoft SourceSafe for MS-DOS 3.04
  • Microsoft SourceSafe for MS-DOS 3.1
  • Microsoft SourceSafe for Windows 3.04
  • Microsoft SourceSafe for Windows 3.1
  • Microsoft SourceSafe for Macintosh 3.04
  • Microsoft SourceSafe for Macintosh 3.1
  • Microsoft SourceSafe for Windows NT 3.04
  • Microsoft SourceSafe for Windows NT 3.1

This article was previously published under Q129187

SYMPTOMS

Files are truncated one byte when placed in SourceSafe.

CAUSE

SourceSafe converts the <carriage return> <line feed> combination when adding a text file to SourceSafe. Some programs write files out with the <carriage return> <line feed> <end of file> combination at the end of the file. SourceSafe will truncate the <end of file> character if the file is stored as a text file.

On occasion, text files are interpreted by programs that rely on this <end of file> character. This behavior may cause problems with these programs.

RESOLUTION

Change the file type in SourceSafe from Text to Binary.
  1. Enter the following from the Command Line:

    ss filetype <filename> -b

  2. in the interface, choose Properties from the Info menu. Change the Type from Text to Binary.
To have SourceSafe read files in as type Binary by default, use the Binary_Masks setting in the SRCSAFE.INI or SS.INI files:

Binary_Masks = *.BAS

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbprb kbusage KB129187