diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-02-06 16:44:34 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-02-06 16:45:13 +0100 |
commit | 30270a259c35d84fcedfe7ee1a1aefad655c7fa3 (patch) | |
tree | ecc2e197ddea0209ab2adfe67d062a4461e82e60 /fb.py | |
parent | c29e58d29debb86a55d2eb38e7033928df769003 (diff) |
Fix error when repasting a single URL/ID
`fb id://1234 --name test` would skip uploading the file since it is
already uploaded. With this change, the file is first downloaded and
then uploaded again to result in a new ID.
Setting the file name via --name does not work yet for this example
command and is not addressed by this commit.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.py')
-rwxr-xr-x | fb.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -609,6 +609,9 @@ class FBClient: upload_files.append(file) + if len(upload_files) == 1 and not upload_files[0].should_upload(): + upload_files[0] = self.url_to_file(self.config['pastebin']+'/'+upload_files[0].id) + resp = self.curlw.upload_files(upload_files) if self.args.multipaste or len(resp) > 1: |