{
Resource_KindOfLine aKind;
TCollection_AsciiString Token1, Token2;
- TCollection_AsciiString Directory, Name;
- TCollection_AsciiString FileName;
- OSD_File File = OSD_Path(aPath);
+ OSD_Path Path(aPath);
+ OSD_File File = Path;
+ TCollection_AsciiString FileName = Path.Name();
File.Open(OSD_ReadOnly,OSD_Protection());
if (File.Failed()) {
if (myVerbose)
TCollection_AsciiString aResPath(dir);
OSD_Path anOSDPath(aResPath);
- anOSDPath.DownTrek(anOSDPath.Name());
+
+ if (!anOSDPath.Name().IsEmpty())
+ {
+ anOSDPath.DownTrek(anOSDPath.Name());
+ }
+
anOSDPath.SetName(aName);
anOSDPath.SystemName(aPath);
--- /dev/null
+puts "==========="
+puts "OCC27433 Opening/Saving OCAF Documents With Own Document Format Does Not Work"
+puts "==========="
+
+# make variable ends with "/" to get empty myName in OSD_Path
+dsetenv "CSF_PluginDefaults" [dgetenv CSF_PluginDefaults]/
+
+# Create simple document with some data
+NewDocument Doc BinOcaf
+SetInteger Doc 0:2 100
+
+# Save the document
+set aFile ${imagedir}/OCC27433-[file tail [info script]].cbf
+file delete ${aFile}
+puts ${aFile}
+catch {SaveAs Doc ${aFile}}
+if { ![file exists ${aFile}] } {
+ puts "Error: Can not save the file with path to plugins ended with slash"
+}
+
+Close Doc