View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030769 | Community | OCCT:Foundation Classes | public | 2019-06-05 17:51 | 2019-07-08 14:08 |
Reporter | Vico Liang | Assigned To | bugmaster | ||
Priority | normal | Severity | block | ||
Status | closed | Resolution | no change required | ||
Product Version | 7.4.0 | ||||
Target Version | 7.4.0 | ||||
Summary | 0030769: OSD_FileNode::Exists () doesn't work properly on uwp | ||||
Description | The function of below are latest git version, it will return false for file actually exist on uwp. It can be reproduced on windows 10 uwp simulator. The problem occurs in function GetFileAttributesExW which retuning false. Due to this issue, it's impossible to open and save ocaf document on uwp. Standard_Boolean OSD_FileNode::Exists () { myError.Reset(); Standard_Boolean retVal = Standard_False;; TCollection_AsciiString fName; myPath.SystemName ( fName ); if ( fName.IsEmpty () ) return Standard_False; TEST_RAISE( "Exists" ); // make wide character string from UTF-8 TCollection_ExtendedString fNameW(fName); WIN32_FILE_ATTRIBUTE_DATA aFileInfo; if (!GetFileAttributesExW (fNameW.ToWideString(), GetFileExInfoStandard, &aFileInfo)) { if (GetLastError() != ERROR_FILE_NOT_FOUND) { _osd_wnt_set_error (myError, OSD_WFileNode, fNameW.ToWideString()); } } else { retVal = Standard_True; } return retVal; } // end OSD_FileNode :: Exists | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Below function is affected due to this issue. It will always returning false even if the folder exist. Standard_Boolean CDF_FWOSDriver::Find(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& /*aVersion*/) { OSD_Path thePath=UTL::Path(aFolder); OSD_Directory theDirectory(thePath); if(theDirectory.Exists()) { TCollection_ExtendedString f(aFolder); PutSlash(f); f+=aName; OSD_Path p2 = UTL::Path(f); OSD_File theFile(p2); return theFile.Exists(); } return Standard_False; } |
|
This is not an occt issue, it's about UWP file accessing restriction. UWP don't allow file accessing outside sandbox. If the file inside sandbox, it will work. so this issue can be closed. |
|
Dear Bugmaster, please close the issue. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-05 17:51 | Vico Liang | New Issue | |
2019-06-05 17:51 | Vico Liang | Assigned To | => abv |
2019-06-05 17:53 | Vico Liang | Relationship added | related to 0030761 |
2019-06-05 17:57 | Vico Liang | Note Added: 0084898 | |
2019-06-06 05:39 | Vico Liang | Note Added: 0084903 | |
2019-06-06 05:39 | Vico Liang | Note Edited: 0084903 | |
2019-06-06 05:41 | Vico Liang | Note Edited: 0084903 | |
2019-06-24 09:25 | kgv | Relationship added | related to 0030770 |
2019-06-24 09:25 | kgv | Note Added: 0085241 | |
2019-06-24 09:25 | kgv | Assigned To | abv => bugmaster |
2019-06-24 09:25 | kgv | Status | new => feedback |
2019-06-24 09:25 | kgv | Resolution | open => no change required |
2019-07-08 14:08 | bugmaster | Status | feedback => closed |