Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2018-01-30 03:15:34 +0300
committerKornel <kornel@geekhood.net>2018-01-30 03:35:06 +0300
commit866a06f5a0c0ede11979504a318e150030aa7a11 (patch)
treebb8a2795afb445aa46167232254384ed82caf518 /CPP/Windows
parentda28077952faf9e716ed7987b842d31617a10125 (diff)
18.0118.01
Diffstat (limited to 'CPP/Windows')
-rw-r--r--CPP/Windows/FileDir.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/CPP/Windows/FileDir.cpp b/CPP/Windows/FileDir.cpp
index 72e0b7f7..62b11c10 100644
--- a/CPP/Windows/FileDir.cpp
+++ b/CPP/Windows/FileDir.cpp
@@ -667,12 +667,27 @@ bool CTempFile::Remove()
bool CTempFile::MoveTo(CFSTR name, bool deleteDestBefore)
{
+ // DWORD attrib = 0;
if (deleteDestBefore)
+ {
if (NFind::DoesFileExist(name))
+ {
+ // attrib = NFind::GetFileAttrib(name);
if (!DeleteFileAlways(name))
return false;
+ }
+ }
DisableDeleting();
return MyMoveFile(_path, name);
+
+ /*
+ if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_READONLY))
+ {
+ DWORD attrib2 = NFind::GetFileAttrib(name);
+ if (attrib2 != INVALID_FILE_ATTRIBUTES)
+ SetFileAttrib(name, attrib2 | FILE_ATTRIBUTE_READONLY);
+ }
+ */
}
bool CTempDir::Create(CFSTR prefix)