summaryrefslogtreecommitdiffstats
path: root/mbbsd/more.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-16 03:06:22 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-16 03:06:22 +0800
commite449477e01540e4eae2ad9099ad2f3c35ddfe2f9 (patch)
treeddc3c76f3deec974912104089d5a1913be3dce63 /mbbsd/more.c
parent2c640a10e0efafdb212636515699d871e035540e (diff)
downloadpttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.gz
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.bz2
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.lz
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.xz
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.zst
pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@109 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/more.c')
-rw-r--r--mbbsd/more.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mbbsd/more.c b/mbbsd/more.c
index 4265d75f..c8abd17e 100644
--- a/mbbsd/more.c
+++ b/mbbsd/more.c
@@ -1,4 +1,4 @@
-/* $Id: more.c,v 1.3 2002/04/15 17:07:11 ptt Exp $ */
+/* $Id: more.c,v 1.4 2002/04/15 19:06:22 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -238,12 +238,10 @@ int more(char *fpath, int promptend) {
char cpath[256];
cachepath(cpath,fpath);
++GLOBE[0];
- if( (fd = open(cpath, O_RDONLY)) < 0 ){
- if( (fd = updatemdcache(cpath, fpath)) < 0 )
+ if( (fd = open(cpath, O_RDONLY)) < 0 ||
+ (fd = updatemdcache(cpath, fpath)) < 0 )
return -1;
- }
- else
- ++GLOBE[1];
+ ++GLOBE[1];
}
else
fd = open (fpath, O_RDONLY, 0600);