Merge pull request #6672 from linxiulei/fix_rel
Turn paths from cmdline into absolute paths
This commit is contained in:
		@@ -321,6 +321,13 @@ func applyFlags(context *cli.Context, config *srvconfig.Config) error {
 | 
				
			|||||||
	} {
 | 
						} {
 | 
				
			||||||
		if s := context.GlobalString(v.name); s != "" {
 | 
							if s := context.GlobalString(v.name); s != "" {
 | 
				
			||||||
			*v.d = s
 | 
								*v.d = s
 | 
				
			||||||
 | 
								if v.name == "root" || v.name == "state" {
 | 
				
			||||||
 | 
									absPath, err := filepath.Abs(s)
 | 
				
			||||||
 | 
									if err != nil {
 | 
				
			||||||
 | 
										return err
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									*v.d = absPath
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user