mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
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 <jaltman@openafs.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
33010ef25e
commit
03bb2c9d40
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user