Changeset 611 for trunk/gui/vizservers/nanovis/R2/src/R2FilePath.cpp
- Timestamp:
- Mar 8, 2007, 10:38:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/vizservers/nanovis/R2/src/R2FilePath.cpp
r582 r611 23 23 24 24 _curDirectory = buff; 25 25 26 } 26 27 … … 54 55 else 55 56 { 57 FILE* f = fopen("/tmp/insoo.txt", "wt"); 58 fprintf(f, "%s\n", (char*) (_curDirectory + R2string(token))); 59 fprintf(f, "%s\n", (char*) (_curDirectory + R2string(token) + "/")); 60 fclose(f); 61 56 62 if (token[lastIndex] == '/' || token[lastIndex] == '\\') 57 63 { … … 100 106 } 101 107 108 void R2FilePath::setWorkingDirectory(int argc, const char** argv) 109 { 110 char buff[255]; 111 strcpy(buff, argv[0]); 112 for (int i = strlen(buff) - 1; i >= 0; --i) 113 { 114 if (buff[i] == '\\' || buff[i] == '/') 115 { 116 buff[i] = '/'; 117 buff[i + 1] = '\0'; 118 break; 119 } 120 } 102 121 122 _curDirectory = buff; 123 } 124
Note: See TracChangeset
for help on using the changeset viewer.