Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
仰若水
frappe
Commits
450a54ec
Commit
450a54ec
authored
7 years ago
by
Saurabh
Committed by
Rushabh Mehta
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
[fix] prepare file list by including all nested files (#4491)
parent
fe7a7d81
develop
v11.1.5
v11.1.4
v11.1.3
v11.1.2
v11.1.1
v11.1.0
v11.0.3
v11.0.3-beta.51
v11.0.3-beta.50
v11.0.3-beta.49
v11.0.3-beta.48
v11.0.3-beta.47
v11.0.3-beta.46
v11.0.3-beta.45
v11.0.3-beta.44
v11.0.3-beta.43
v11.0.3-beta.42
v11.0.3-beta.41
v11.0.3-beta.40
v11.0.3-beta.39
v11.0.3-beta.38
v11.0.3-beta.37
v11.0.3-beta.36
v11.0.3-beta.35
v11.0.3-beta.34
v11.0.3-beta.33
v11.0.3-beta.32
v11.0.3-beta.31
v11.0.3-beta.30
v11.0.3-beta.29
v11.0.3-beta.28
v11.0.3-beta.27
v11.0.3-beta.26
v11.0.3-beta.25
v11.0.3-beta.24
v11.0.3-beta.23
v11.0.3-beta.22
v11.0.3-beta.21
v11.0.3-beta.20
v11.0.3-beta.19
v11.0.3-beta.18
v11.0.3-beta.17
v11.0.3-beta.16
v11.0.3-beta.15
v11.0.3-beta.14
v11.0.3-beta.13
v11.0.3-beta.12
v11.0.3-beta.11
v11.0.3-beta.10
v11.0.3-beta.9
v11.0.3-beta.8
v11.0.3-beta.7
v11.0.3-beta.6
v11.0.3-beta.5
v11.0.3-beta.4
v11.0.3-beta.3
v11.0.3-beta.2
v11.0.3-beta.1
v11.0.2
v11.0.1
v11.0.0-beta
v10.1.71
v10.1.70
v10.1.69
v10.1.68
v10.1.67
v10.1.66
v10.1.65
v10.1.64
v10.1.63
v10.1.62
v10.1.61
v10.1.60
v10.1.59
v10.1.58
v10.1.57
v10.1.56
v10.1.55
v10.1.54
v10.1.53
v10.1.52
v10.1.51
v10.1.50
v10.1.49
v10.1.49-beta.1
v10.1.48
v10.1.47
v10.1.46
v10.1.45
v10.1.44
v10.1.43
v10.1.42
v10.1.41
v10.1.40
v10.1.39
v10.1.38
v10.1.37
v10.1.36
v10.1.35
v10.1.34
v10.1.33
v10.1.32
v10.1.31
v10.1.30
v10.1.29
v10.1.28
v10.1.27
v10.1.26
v10.1.25
v10.1.24
v10.1.23
v10.1.22
v10.1.21
v10.1.20
v10.1.19
v10.1.18
v10.1.17
v10.1.16
v10.1.15
v10.1.14
v10.1.13
v10.1.12
v10.1.11
v10.1.10
v10.1.9
v10.1.8
v10.1.7
v10.1.6
v10.1.5
v10.1.4
v10.1.3
v10.1.2
v10.1.1
v10.1.0
v10.0.25
v10.0.24
v10.0.23
v10.0.22
v10.0.21
v10.0.20
v10.0.19
v10.0.18
v10.0.17
v10.0.16
v10.0.15
v10.0.14
v10.0.13
v10.0.12
v10.0.11
v10.0.10
v10.0.9
v10.0.8
v10.0.7
v10.0.6
v10.0.5
v10.0.4
v10.0.3
v10.0.2
v10.0.1
v10.0.0
v9.2.25
v9.2.24
v9.2.23
v9.2.22
v9.2.21
v9.2.20
v9.2.19
v9.2.18
v9.2.17
v9.2.16
v9.2.15
v9.2.14
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frappe/integrations/doctype/dropbox_settings/dropbox_settings.py
+21
-20
...integrations/doctype/dropbox_settings/dropbox_settings.py
with
21 additions
and
20 deletions
+21
-20
frappe/integrations/doctype/dropbox_settings/dropbox_settings.py
View file @
450a54ec
...
...
@@ -122,26 +122,27 @@ def upload_from_folder(path, dropbox_folder, dropbox_client, did_not_upload, err
else
:
raise
for
filename
in
os
.
listdir
(
path
):
filename
=
cstr
(
filename
)
if
filename
in
ignore_list
:
continue
found
=
False
filepath
=
os
.
path
.
join
(
path
,
filename
)
for
file_metadata
in
response
.
entries
:
if
(
os
.
path
.
basename
(
filepath
)
==
file_metadata
.
name
and
os
.
stat
(
encode
(
filepath
)).
st_size
==
int
(
file_metadata
.
size
)):
found
=
True
break
if
not
found
:
try
:
upload_file_to_dropbox
(
filepath
,
dropbox_folder
,
dropbox_client
)
except
Exception
:
did_not_upload
.
append
(
filename
)
error_log
.
append
(
frappe
.
get_traceback
())
for
root
,
directory
,
files
in
os
.
walk
(
path
):
for
filename
in
files
:
filename
=
cstr
(
filename
)
filepath
=
os
.
path
.
join
(
root
,
filename
)
if
filename
in
ignore_list
:
continue
found
=
False
for
file_metadata
in
response
.
entries
:
if
(
os
.
path
.
basename
(
filepath
)
==
file_metadata
.
name
and
os
.
stat
(
encode
(
filepath
)).
st_size
==
int
(
file_metadata
.
size
)):
found
=
True
break
if
not
found
:
try
:
upload_file_to_dropbox
(
filepath
,
dropbox_folder
,
dropbox_client
)
except
Exception
:
did_not_upload
.
append
(
filepath
)
error_log
.
append
(
frappe
.
get_traceback
())
def
upload_file_to_dropbox
(
filename
,
folder
,
dropbox_client
):
create_folder_if_not_exists
(
folder
,
dropbox_client
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help