OSDN Git Service

accept [enter] as the default option [Y]
authormunetoh <munetoh@users.sourceforge.jp>
Sat, 3 Sep 2011 23:11:37 +0000 (08:11 +0900)
committermunetoh <munetoh@users.sourceforge.jp>
Sat, 3 Sep 2011 23:11:37 +0000 (08:11 +0900)
src/openpts.c

index 5883e86..f0bd6de 100644 (file)
@@ -137,7 +137,8 @@ int getDefaultConfigfile(OPENPTS_CONFIG *conf) {
         conf->uuid->status = OPENPTS_UUID_FILENAME_ONLY;
         genOpenptsUuid(conf->uuid);
 
-        if ((ans == 'Y') || (ans == 'y')) {
+        /* Y,y and just enter => create ~/.openpts */
+        if ((ans == 'Y') || (ans == 'y') || (ans == 0x0a)) {
             rc = mkdir(dirbuf, S_IRUSR | S_IWUSR | S_IXUSR);
             rc = writeOpenptsUuidFile(conf->uuid, 1);
             if (rc != PTS_SUCCESS) {