From 03bb2c9d40859ce5d1205e7c8503a80c8192f5e4 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 5 Apr 2010 13:19:49 -0400 Subject: [PATCH] Windows: cm_UpdateVolumeLocation !append exts to num vol names cm_UpdateVolumeLocation will append ".readonly" to a volume name if the base name cannot be located. However, this should not be done if the base name is numeric. LICENSE MIT Change-Id: Id61b8803eed51d124b612ffba8b185a4b4982c1d Reviewed-on: http://gerrit.openafs.org/1695 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- src/WINNT/afsd/cm_volume.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 8786260..053f379 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -268,11 +268,14 @@ long cm_UpdateVolumeLocation(struct cm_cell *cellp, cm_user_t *userp, cm_req_t * } /* We can end up here with code == CM_ERROR_NOSUCHVOLUME if the base volume name - * does not exist but there might exist a .readonly volume. If the base name - * doesn't exist we will not care about the .backup that might be left behind - * since there should be no method to access it. + * does not exist and is not a numeric string but there might exist a .readonly volume. + * If the base name doesn't exist we will not care about the .backup that might be left + * behind since there should be no method to access it. */ - if (code == CM_ERROR_NOSUCHVOLUME && volp->vol[RWVOL].ID == 0 && strlen(volp->namep) < (VL_MAXNAMELEN - 9)) { + if (code == CM_ERROR_NOSUCHVOLUME && + _atoi64(volp->namep) == 0 && + volp->vol[RWVOL].ID == 0 && + strlen(volp->namep) < (VL_MAXNAMELEN - 9)) { char name[VL_MAXNAMELEN]; snprintf(name, VL_MAXNAMELEN, "%s.readonly", volp->namep); -- 1.9.4