Skip to content

Commit

Permalink
fix: escape slash in folder name
Browse files Browse the repository at this point in the history
Resolves #50
  • Loading branch information
barredterra committed Dec 18, 2024
1 parent 255f61f commit 518aaf4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pdf_on_submit/attach_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ def publish_progress(percent):

def create_folder(folder, parent):
"""Make sure the folder exists and return it's name."""
new_folder_name = "/".join([parent, folder])

_folder = folder.replace("/", "-")
new_folder_name = "/".join([parent, _folder])

if not frappe.db.exists("File", new_folder_name):
create_new_folder(folder, parent)
create_new_folder(_folder, parent)

return new_folder_name


Expand Down

0 comments on commit 518aaf4

Please sign in to comment.