| 348 | |
| 349 | #if defined(WIN_NT) |
| 350 | bool ISC_analyze_pclan(tstring& expanded_name, tstring& node_name) |
| 351 | { |
| 352 | /************************************** |
| 353 | * |
| 354 | * I S C _ a n a l y z e _ p c l a n |
| 355 | * |
| 356 | ************************************** |
| 357 | * |
| 358 | * Functional description |
| 359 | * Check a file name for a SMB mount point. If so, |
| 360 | * decompose into node name and remote file name. |
| 361 | * |
| 362 | **************************************/ |
| 363 | ISC_expand_share(expanded_name); |
| 364 | |
| 365 | if (expanded_name.length() < 2 || |
| 366 | (expanded_name[0] != '\\' && expanded_name[0] != '/') || |
| 367 | (expanded_name[1] != '\\' && expanded_name[1] != '/')) |
| 368 | { |
| 369 | return false; |
| 370 | } |
| 371 | |
| 372 | const size p = expanded_name.find_first_of("\\/", 2); |
| 373 | if (p == npos) |
| 374 | return false; |
| 375 | |
| 376 | if (Config::getRemoteFileOpenAbility()) |
| 377 | { |
| 378 | if (expanded_name.find(':', p + 1) == npos) |
| 379 | return false; |
| 380 | } |
| 381 | |
| 382 | node_name = expanded_name.substr(2, p - 2); |
| 383 | expanded_name.erase(0, p + 1); |
| 384 | |
| 385 | return true; |
| 386 | } |
| 387 | #endif |
| 388 | |
| 389 |
no test coverage detected