Mercurial > pidgin
comparison libpurple/win32/libc_interface.c @ 18981:d68bf68ad499
propagate from branch 'im.pidgin.pidgin' (head efa0e31922a07bb598a6fc8951462e1fa96a886e)
to branch 'im.pidgin.soc.2007.certmgr' (head 24642188259ac4e48c6a2139c002ae9619751fc8)
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Mon, 02 Jul 2007 17:18:49 +0000 |
parents | 959091d9c345 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
18980:1cc1c9b06bbf | 18981:d68bf68ad499 |
---|---|
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 { |