Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.06k stars 233 forks source link

The --directories recursive is not working properly #153

Closed tissole closed 2 years ago

tissole commented 2 years ago

Description

The --directories recursive option is behaving strangely

What I Did

I run telegram-upload --to me --directories recursive "D:\Backup" The error

File "D:\Backup" is empty. [Error] telegram-upload Exception: MissingFileError: Files do not exist

In is not empty, there is a folder with subfolders and files in them. I can upload only if I run the command telegram-upload --to me --directories recursive "D:\Backup\Power Training Course"

I tested with version 4.0 and is working, so the newer version introduced this behaviour.

Nekmo commented 2 years ago

Tried to reproduce on GNU/Linux without success:

telegram-load --to me --directories recursive /tmp/foobar/
Uploading "doorbell.wav"

Directory tree:

$ ls -lR
.:
total 0
drwxr-xr-x 2 nekmo users 60 may 13 00:44 sub

./sub:
total 604
-rw-r--r-- 1 nekmo users 615120 ene 24 02:09 doorbell.wav
Nekmo commented 2 years ago

@tissole more information is needed to reproduce the error. Maybe it's a bug in Windows.

tissole commented 2 years ago

I tried again, same error. It seems to me that the issue is related to the depth of nested folders. My directory is like this:D:\A\B\C\video1. If I run telegram-upload --to me --directories recursive D:\A, it fails. But if I run telegram-upload --to me --directories recursive D:\A\B, is working. So apparently the script doesn't go recursively more than 1 level.

Nekmo commented 2 years ago

Tried with two subdirectories:

telegram-upload --directories recursive /tmp/foobar

Directories:

$ tree
.
└── sub
    └── sub2
        └── doorbell.wav

Tried with three subdirectories:

telegram-upload --directories recursive /tmp/foobar

Directories:

$ tree
.
└── sub
    └── sub2
        └── sub3
            └── doorbell.wav

On GNU/Linux I can't reproduce the error @tissole . Maybe it's a Windows bug.

tissole commented 2 years ago

It is working in version 0.4, so 0.5 introduced some changes that caused this issue, at least on Windows.

tissole commented 2 years ago

I'm closing this issue because it is resolved. Funny thing is I don't know what cause it in the first place.

tissole commented 2 years ago

I'm sorry, I don't know what is the cause. Try to reinstall. Now is working for me.

On Thursday, June 23, 2022 at 06:16:20 PM GMT+3, xd003 ***@***.***> wrote:  

i am facing this issue on Ubuntu sadly , unable to upload the directory @tissole you have any idea what fixed it by any chance ?

telegram-upload --to CHATID --directories recursive --large-files split $HOME/Test gives the following error

[Error] telegram-upload Exception: MissingFileError: Files do not exist.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>