comparison libpurple/win32/libc_interface.c @ 18399:959091d9c345

Fix some S_ISDIR calls to work with Visual Studio. --rlaager committer: Richard Laager <rlaager@wiktel.com>
author Nick Hebner <hebnern@gmail.com>
date Sun, 01 Jul 2007 01:46:01 +0000
parents e60f5e8bb77e
children 44b4e8bd759b
comparison
equal deleted inserted replaced
18398:16bdcffb1c62 18399:959091d9c345
411 411
412 if(g_stat(oldname, &oldstat) == 0) { 412 if(g_stat(oldname, &oldstat) == 0) {
413 /* newname exists */ 413 /* newname exists */
414 if(g_stat(newname, &newstat) == 0) { 414 if(g_stat(newname, &newstat) == 0) {
415 /* oldname is a dir */ 415 /* oldname is a dir */
416 if(_S_ISDIR(oldstat.st_mode)) { 416 if(S_ISDIR(oldstat.st_mode)) {
417 if(!_S_ISDIR(newstat.st_mode)) { 417 if(!S_ISDIR(newstat.st_mode)) {
418 return g_rename(oldname, newname); 418 return g_rename(oldname, newname);
419 } 419 }
420 /* newname is a dir */ 420 /* newname is a dir */
421 else { 421 else {
422 /* This is not quite right.. If newname is empty and 422 /* This is not quite right.. If newname is empty and
428 } 428 }
429 } 429 }
430 /* oldname is not a dir */ 430 /* oldname is not a dir */
431 else { 431 else {
432 /* newname is a dir */ 432 /* newname is a dir */
433 if(_S_ISDIR(newstat.st_mode)) { 433 if(S_ISDIR(newstat.st_mode)) {
434 errno = EISDIR; 434 errno = EISDIR;
435 return -1; 435 return -1;
436 } 436 }
437 /* newname is not a dir */ 437 /* newname is not a dir */
438 else { 438 else {