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

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2019-02-23 01:36:12 +0300
committerBen Wiederhake <BenWiederhake.GitHub@gmx.de>2019-02-23 01:36:12 +0300
commitbec2e6d537c272ed185e8c41ff81b4b8521a131d (patch)
treed3e34586e82c4e11e2db35d32e19fef4afe081f6
parentee46026da0e5018131bbd2f43b41e45eb0afef07 (diff)
Revert "Add tilde expansion to file uploads"dev-1.4.0
This reverts commit 6b8da837e4ee6d2f402bc47efe9d2c0f5015b858. This is necessary because tgp does not use the tilda-expansion feature, and it prevents cross-compilation, because this symbol seems to be unavailable in the mingw-libc.
-rw-r--r--queries.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/queries.c b/queries.c
index 3ee638b..c13ac3d 100644
--- a/queries.c
+++ b/queries.c
@@ -31,7 +31,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <wordexp.h>
#ifndef WIN32
#include <sys/utsname.h>
#endif
@@ -2121,12 +2120,7 @@ static void send_file_thumb (struct tgl_state *TLS, struct send_file *f, const v
static void _tgl_do_send_photo (struct tgl_state *TLS, tgl_peer_id_t to_id, const char *file_name, tgl_peer_id_t avatar, int w, int h, int duration, const void *thumb_data, int thumb_len, const char *caption, int caption_len, unsigned long long flags, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, struct tgl_message *M), void *callback_extra) {
- wordexp_t wrdexp;
- int status = wordexp(file_name,&wrdexp,0);
- int fd=-1;
- if(status == 0)
- fd = open (wrdexp.we_wordv[0], O_RDONLY | O_BINARY);
- wordfree(&wrdexp);
+ int fd = open (file_name, O_RDONLY | O_BINARY);
if (fd < 0) {
tgl_set_query_error (TLS, EBADF, "Can not open file: %s", strerror(errno));
if (!avatar.peer_id) {