Wiki

Ticket #294: chk-install-dir.patch

File chk-install-dir.patch, 0.9 KB (added by hopscc, 12 years ago)
  • Source/InstallFromWorkspace.cobra

     
    509509    def verifyInstallDirectory 
    510510        .startStage('Verify installation directory') 
    511511        default = if(.isRunningOnUnix, .installDirectories[1], .installDirectories[0]) 
     512        # ensure install files dir != cwd 
     513        if  Environment.currentDirectory.startsWith(default) 
     514            msg='Target Directory to install Cobra to and the installation files root directory are the same. "[default]"\n' 
     515            msg += 'Please place these downloaded installation files in some other (temporary) directory.' 
     516            .error(msg) 
     517         
    512518        if File.exists(.configFileName) 
    513519            # get install directory from first line of the file 
    514520            useDir = File.openText(.configFileName).readLine