mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
31afd1c9aa
commit
186cf59ec4
@ -157,7 +157,7 @@ get_object_filename(IPortableDeviceProperties *devprops, IPortableDeviceKeyColle
|
|||||||
Py_BEGIN_ALLOW_THREADS;
|
Py_BEGIN_ALLOW_THREADS;
|
||||||
hr = devprops->GetValues(object_id, properties, &values);
|
hr = devprops->GetValues(object_id, properties, &values);
|
||||||
Py_END_ALLOW_THREADS;
|
Py_END_ALLOW_THREADS;
|
||||||
if (FAILED(hr)) { hresult_set_exc("Failed to get properties for object", hr); return NULL; }
|
if (FAILED(hr)) { hresult_set_exc("Failed to get filename for object", hr); return NULL; }
|
||||||
com_wchar_raii property;
|
com_wchar_raii property;
|
||||||
hr = values->GetStringValue(WPD_OBJECT_ORIGINAL_FILE_NAME, property.unsafe_address());
|
hr = values->GetStringValue(WPD_OBJECT_ORIGINAL_FILE_NAME, property.unsafe_address());
|
||||||
if (SUCCEEDED(hr)) return PyUnicode_FromWideChar(property.ptr(), -1);
|
if (SUCCEEDED(hr)) return PyUnicode_FromWideChar(property.ptr(), -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user