Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
1d32722f
Commit
1d32722f
authored
Dec 10, 2024
by
xu rui
Browse files
fix: not create empty directory
parent
f6af67eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/data/data_reader_writer/filebase.py
magic_pdf/data/data_reader_writer/filebase.py
+1
-1
No files found.
magic_pdf/data/data_reader_writer/filebase.py
View file @
1d32722f
...
...
@@ -55,7 +55,7 @@ class FileBasedDataWriter(DataWriter):
if
not
os
.
path
.
isabs
(
fn_path
)
and
len
(
self
.
_parent_dir
)
>
0
:
fn_path
=
os
.
path
.
join
(
self
.
_parent_dir
,
path
)
if
not
os
.
path
.
exists
(
os
.
path
.
dirname
(
fn_path
)):
if
not
os
.
path
.
exists
(
os
.
path
.
dirname
(
fn_path
))
and
os
.
path
.
dirname
(
fn_path
)
!=
""
:
os
.
makedirs
(
os
.
path
.
dirname
(
fn_path
),
exist_ok
=
True
)
with
open
(
fn_path
,
'wb'
)
as
f
:
...
...
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