Skip to content

Commit

Permalink
продолжение b246
Browse files Browse the repository at this point in the history
  • Loading branch information
w17 committed Jan 12, 2017
1 parent 043b325 commit e8746bc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions plugins/arclite/arclite-extra.farconfig
Expand Up @@ -8,14 +8,14 @@
<value name="max_check_size" type="qword" value="0000000000800000" />
<!-- 8MB (default = 1MB) -->

<value name="correct_name_mode" type="qword" value="0000000000000013" />
<value name="correct_name_mode" type="qword" value="0000000000000012" />
<!-- 0x10 correct empty filenames ("" converted to "_") -->
<!-- 0x20 remove trailing dots/spaces -->
<!-- 0x40 corrcet reserved names (NUL, LPT1, ...) -->
<!-- ==== < > : * ? "" | / \ '\x01' ... '\x1f' -->
<!-- 0x.0 < > : * ? "" | / \ '\x01' ... '\x1f' -->
<!-- 0x.1 _ _ _ _ _ __ _ _ _ _______________________________ -->
<!-- 0x.2 « » = ¤ ¿ “” ¦ ⁄ ¬ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ -->
<!-- 0x.2 « » ¤ ¿ “” ¦ ⁄ ¬ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ -->
<!-- 0x.3 « » ։ ✶ ¿ “” ¦ ⁄ ¬ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ -->
<!-- default = 0x12 -->
</key>
Expand Down
4 changes: 4 additions & 0 deletions plugins/arclite/changelog
@@ -1,3 +1,7 @@
w17 12.01.2017 14:08:28 +0300 - build 247

1. Продолжение 246.

w17 09.01.2017 20:22:47 +0300 - build 246

1. 0002758: Распаковка файлов с некорректными именами
Expand Down
6 changes: 4 additions & 2 deletions plugins/arclite/extract.cpp
Expand Up @@ -543,10 +543,11 @@ class PrepareExtract: public ProgressMonitor {
}

void prepare_extract(const FileIndexRange& index_range, const wstring& parent_dir) {
const auto cmode = static_cast<int>(g_options.correct_name_mode);
for_each(index_range.first, index_range.second, [&] (UInt32 file_index) {
const ArcFileInfo& file_info = archive.file_list[file_index];
if (file_info.is_dir) {
wstring dir_path = add_trailing_slash(parent_dir) + file_info.name;
wstring dir_path = add_trailing_slash(parent_dir) + correct_filename(file_info.name, cmode);
update_progress(dir_path);

RETRY_OR_IGNORE_BEGIN
Expand Down Expand Up @@ -596,9 +597,10 @@ class SetDirAttr: public ProgressMonitor {
}

void set_dir_attr(const FileIndexRange& index_range, const wstring& parent_dir) {
const auto cmode = static_cast<int>(g_options.correct_name_mode);
for_each (index_range.first, index_range.second, [&] (UInt32 file_index) {
const ArcFileInfo& file_info = archive.file_list[file_index];
wstring file_path = add_trailing_slash(parent_dir) + file_info.name;
wstring file_path = add_trailing_slash(parent_dir) + correct_filename(file_info.name, cmode);
update_progress(file_path);
if (file_info.is_dir) {
FileIndexRange dir_list = archive.get_dir_list(file_index);
Expand Down
11 changes: 6 additions & 5 deletions plugins/arclite/pathutils.cpp
Expand Up @@ -195,9 +195,10 @@ static wchar_t quotes2[2] = { LeftPointing_Double_Angle_Quotation_Mark, RightPoi
// ':'
//static const wchar_t Division_Sign = L'\u00F7'; // '÷'
//static const wchar_t Identical_To = L'\u2216'; // '≡'
static const wchar_t Horizontal_Ellipsis = L'\u2026'; // '…'
static const wchar_t American_Full_Stop = L'\u0589'; // '։' --missed in Lucida Console font
//static const wchar_t Raised Colon = L'\u02F8'; // '˸' --missed in Lucida Console font
static wchar_t colons[2] = { L'=', American_Full_Stop };
static wchar_t colons[2] = {Horizontal_Ellipsis, American_Full_Stop };

// '*'
static const wchar_t Currency_Sign = L'\u00A4'; // '¤'
Expand Down Expand Up @@ -241,8 +242,8 @@ static const wchar_t control_chars[32 - 1] =
, L'\u266A' // \x0D '♪' (Eight Note)
, L'\u266B' // \x0E '♫' (Beamed Eight Note)
, L'\u263C' // \x0F '☼' (White Sun With Rays)
, L'\u25BA' // \x10 '►' (Black Right - Pointing Pointer)
, L'\u25C4' // \x11 '◄' (Black Left - Pointing Pointer)
, L'\u25BA' // \x10 '►' (Black Right-Pointing Pointer)
, L'\u25C4' // \x11 '◄' (Black Left-Pointing Pointer)
, L'\u2195' // \x12 '↕' (Up Down Arrow)
, L'\u203C' // \x13 '‼' (Double Exclamation Mark)
, L'\u00B6' // \x14 '¶' (Pilcrow Sign)
Expand All @@ -255,8 +256,8 @@ static const wchar_t control_chars[32 - 1] =
, L'\u2190' // \x1B '←' (Leftwards Arrow)
, L'\u221F' // \x1C '∟' (Right Angle)
, L'\u2194' // \x1D '↔' (Left Right Arrow)
, L'\u25B2' // \x1E '▲' (Black Up - Pointing Triangle)
, L'\u25BC' // \x1F '▼' (Black Down - Pointing Triangle)
, L'\u25B2' // \x1E '▲' (Black Up-Pointing Triangle)
, L'\u25BC' // \x1F '▼' (Black Down-Pointing Triangle)
};

//-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion plugins/arclite/project.ini
Expand Up @@ -2,4 +2,4 @@
MODULE = arclite
VER_MAJOR = 3
VER_MINOR = 0
VER_BUILD = 246
VER_BUILD = 247

0 comments on commit e8746bc

Please sign in to comment.