Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e90c6fa6
Commit
e90c6fa6
authored
Sep 20, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os.statvfs() encodes the filename to the filesystem encoding
parent
0e287fba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Modules/posixmodule.c
Modules/posixmodule.c
+9
-5
No files found.
Modules/posixmodule.c
View file @
e90c6fa6
...
@@ -8071,16 +8071,20 @@ Perform a statvfs system call on the given path.");
...
@@ -8071,16 +8071,20 @@ Perform a statvfs system call on the given path.");
static
PyObject
*
static
PyObject
*
posix_statvfs
(
PyObject
*
self
,
PyObject
*
args
)
posix_statvfs
(
PyObject
*
self
,
PyObject
*
args
)
{
{
char
*
path
;
PyObject
*
path
;
int
res
;
int
res
;
struct
statvfs
st
;
struct
statvfs
st
;
if
(
!
PyArg_ParseTuple
(
args
,
"
s:statvfs"
,
&
path
))
if
(
!
PyArg_ParseTuple
(
args
,
"
O&:statvfs"
,
PyUnicode_FSConverter
,
&
path
))
return
NULL
;
return
NULL
;
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
res
=
statvfs
(
path
,
&
st
);
res
=
statvfs
(
PyBytes_AS_STRING
(
path
)
,
&
st
);
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
if
(
res
!=
0
)
if
(
res
!=
0
)
{
return
posix_error_with_filename
(
path
);
posix_error_with_filename
(
PyBytes_AS_STRING
(
path
));
Py_DECREF
(
path
);
return
NULL
;
}
Py_DECREF
(
path
);
return
_pystatvfs_fromstructstatvfs
(
st
);
return
_pystatvfs_fromstructstatvfs
(
st
);
}
}
...
...
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