summaryrefslogtreecommitdiff
path: root/zen
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-08-18 11:26:25 +0000
committerB. Stack <bgstack15@gmail.com>2021-08-18 11:26:25 +0000
commit3569c0964edd9bb68fe8d360180e087c373bf6cc (patch)
treeec5580fe98230ce8eb25a5ed6e53b3ec5dfd03f9 /zen
parentMerge branch '11.12-fix' into 'master' (diff)
parentadd upstream 11.13 (diff)
downloadFreeFileSync-3569c0964edd9bb68fe8d360180e087c373bf6cc.tar.gz
FreeFileSync-3569c0964edd9bb68fe8d360180e087c373bf6cc.tar.bz2
FreeFileSync-3569c0964edd9bb68fe8d360180e087c373bf6cc.zip
Merge branch 'b11.13' into 'master'11.13
add upstream 11.13 See merge request opensource-tracking/FreeFileSync!37
Diffstat (limited to 'zen')
-rw-r--r--zen/file_io.cpp4
-rw-r--r--zen/process_exec.cpp4
-rw-r--r--zen/stl_tools.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/zen/file_io.cpp b/zen/file_io.cpp
index f575a366..7eebd2e8 100644
--- a/zen/file_io.cpp
+++ b/zen/file_io.cpp
@@ -170,8 +170,8 @@ FileBase::FileHandle openHandleForWrite(const Zstring& filePath) //throw FileErr
//O_EXCL contains a race condition on NFS file systems: https://linux.die.net/man/2/open
const int fdFile = ::open(filePath.c_str(), //const char* pathname
- O_CREAT | //int flags
- /*access == FileOutput::ACC_OVERWRITE ? O_TRUNC : */ O_EXCL | O_WRONLY | O_CLOEXEC,
+ O_CREAT | //int flags
+ /*access == FileOutput::ACC_OVERWRITE ? O_TRUNC : */ O_EXCL | O_WRONLY | O_CLOEXEC,
lockFileMode); //mode_t mode
if (fdFile == -1)
{
diff --git a/zen/process_exec.cpp b/zen/process_exec.cpp
index f51ceae2..0c5789d5 100644
--- a/zen/process_exec.cpp
+++ b/zen/process_exec.cpp
@@ -238,8 +238,8 @@ void zen::openWithDefaultApp(const Zstring& itemPath) //throw FileError
try
{
std::optional<int> timeoutMs;
- const Zstring cmdTemplate = R"(xdg-open "%x")"; //*might* block!
- timeoutMs = 0; //e.g. on Lubuntu if Firefox is started and not already running => no need time out! https://freefilesync.org/forum/viewtopic.php?t=8260
+ const Zstring cmdTemplate = R"(xdg-open "%x")"; //*might* block!
+ timeoutMs = 0; //e.g. on Lubuntu if Firefox is started and not already running => no need for time out! https://freefilesync.org/forum/viewtopic.php?t=8260
const Zstring cmdLine = replaceCpy(cmdTemplate, Zstr("%x"), itemPath);
if (const auto& [exitCode, output] = consoleExecute(cmdLine, timeoutMs); //throw SysError, SysErrorTimeOut
diff --git a/zen/stl_tools.h b/zen/stl_tools.h
index a1c5b7b1..e4cf2b5d 100644
--- a/zen/stl_tools.h
+++ b/zen/stl_tools.h
@@ -39,7 +39,7 @@ void removeDuplicates(std::vector<T, Alloc>& v, CompLess less);
template <class T, class Alloc, class CompLess>
void removeDuplicatesStable(std::vector<T, Alloc>& v, CompLess less);
-template <class T, class Alloc>
+template <class T, class Alloc>
void removeDuplicatesStable(std::vector<T, Alloc>& v);
//searching STL containers
@@ -142,8 +142,8 @@ template <class T, class Alloc, class CompLess> inline
void removeDuplicatesStable(std::vector<T, Alloc>& v, CompLess less)
{
std::set<T, CompLess> usedItems(less);
- v.erase(std::remove_if(v.begin(), v.end(),
- [&usedItems](const T& e) { return !usedItems.insert(e).second; }), v.end());
+ v.erase(std::remove_if(v.begin(), v.end(),
+ [&usedItems](const T& e) { return !usedItems.insert(e).second; }), v.end());
}
bgstack15