summaryrefslogtreecommitdiff
path: root/freefilesync/ffs_libssh2.patch
blob: 4fc14973da994704f50af22d086ae32d4f026996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Source: https://aur.archlinux.org/cgit/aur.git/commit/?h=freefilesync&id=7e1524db8e0243ff9d7b7dcba64a3a5228295725
Author: Simon Brulhart
Message: libssh2 v1.8.0 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl.
Method:

    sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp'

diff -x '*.swp' -x .git -Naur 10.10-0/FreeFileSync/Source/afs/sftp.cpp 10.10-1/FreeFileSync/Source/afs/sftp.cpp
--- 10.10-0/FreeFileSync/Source/afs/sftp.cpp	2019-03-12 08:09:58.465098982 -0400
+++ 10.10-1/FreeFileSync/Source/afs/sftp.cpp	2019-03-12 08:27:05.718963710 -0400
@@ -1657,8 +1657,8 @@
             runSftpCommand(login_, L"libssh2_sftp_mkdir", //throw SysError
                            [&](const SshSession::Details& sd) //noexcept!
             {
-#if 1 //let's see how LIBSSH2_SFTP_DEFAULT_MODE works out:
-                return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_DEFAULT_MODE);
+#if 1 //let's see how LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO works out:
+                return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
 #else //default for newly created directories: 0777
                 return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
 #endif
bgstack15