Skip to content

Commit 2f8493d

Browse files
committed
use os.path.basename instead of .split("/")[-1]
1 parent b9f9854 commit 2f8493d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nextcloudclient/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def upload_to_nextcloud(source_paths: list[str], remote_name: str, remote_path:
4848

4949
url = posixpath.join(webdav_url,remote_webdav_path)
5050

51-
filename = file.split("/")[-1]
51+
filename = os.path.basename(file)
5252
tmp_results.append((filename, checksum, size, url))
5353

5454
if os.path.isdir(path):

0 commit comments

Comments
 (0)