~ubuntu-branches/ubuntu/utopic/unrar-nonfree/utopic-updates

« back to all changes in this revision

Viewing changes to arcread.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2008-06-16 19:21:24 UTC
  • mfrom: (1.1.8 upstream) (5.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080616192124-1yg3uz2gh8xy36pc
Tags: 1:3.8.2-1
* New upstream release (Closes: #485490)
* Upstream fixed issue with not listening for /dev/null on stdin
                                                  (Closes: #452805)
* Bumped standards version
* Bumped debhelper version
* Fixed manpage hyphen problem
* Added DM-Upload-Allowed Control Field

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    if (*Cmd->Password==0)
53
53
#ifdef RARDLL
54
54
      if (Cmd->Callback==NULL ||
55
 
          Cmd->Callback(UCM_NEEDPASSWORD,Cmd->UserData,(LONG)Cmd->Password,sizeof(Cmd->Password))==-1)
 
55
          Cmd->Callback(UCM_NEEDPASSWORD,Cmd->UserData,(LPARAM)Cmd->Password,sizeof(Cmd->Password))==-1)
56
56
      {
57
57
        Close();
58
58
        ErrHandler.Exit(USER_BREAK);
370
370
      bool Recovered=false;
371
371
      if (ShortBlock.HeadType==ENDARC_HEAD && (EndArcHead.Flags & EARC_REVSPACE)!=0)
372
372
      {
 
373
        // Last 7 bytes of recovered volume can contain zeroes, because
 
374
        // REV files store its own information (volume number, etc.) here.
373
375
        SaveFilePos SavePos(*this);
374
376
        Int64 Length=Tell();
375
377
        Seek(Length-7,SEEK_SET);
582
584
    if ((byte)*s<32 || (byte)*s>127)
583
585
      *s='_';
584
586
#endif
 
587
 
 
588
#if defined(_WIN_32) || defined(_EMX)
 
589
    // ':' in file names is allowed in Unix, but not in Windows.
 
590
    // Even worse, file data will be written to NTFS stream on NTFS,
 
591
    // so automatic name correction on file create error in extraction 
 
592
    // routine does not work. Let's better replace ':' now.
 
593
    if (NewLhd.HostOS==HOST_UNIX && *s==':')
 
594
      *s='_';
 
595
#endif
 
596
 
585
597
  }
 
598
 
586
599
  for (wchar *s=NewLhd.FileNameW;*s!=0;s++)
 
600
  {
587
601
    if (*s=='/' || *s=='\\')
588
602
      *s=CPATHDIVIDER;
 
603
 
 
604
#if defined(_WIN_32) || defined(_EMX)
 
605
    // ':' in file names is allowed in Unix, but not in Windows.
 
606
    // Even worse, file data will be written to NTFS stream on NTFS,
 
607
    // so automatic name correction on file create error in extraction 
 
608
    // routine does not work. Let's better replace ':' now.
 
609
    if (NewLhd.HostOS==HOST_UNIX && *s==':')
 
610
      *s='_';
 
611
#endif
 
612
  }
589
613
}
590
614
 
591
615