[ http://issues.apache.org/jira/browse/DERBY-304?page=comments#action_12364919 ]
Rajesh Kartha commented on DERBY-304: ------------------------------------- The (file.getCanonicalFile()) gives you the actual path for symbolic links. I am wondering if that could be used to compare the backup location and the actual database to be the same. Something like: f.getCanonicalFile().equals(f1.getCanonicalFile()) This will return true is'f1' is a symbolic link to 'f'. I know for sure this works on Linux. -Rajesh > If by mistake you give he location for the db backup as the db itself , then > windows created directories recursively until windows crashes! > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-304 > URL: http://issues.apache.org/jira/browse/DERBY-304 > Project: Derby > Type: Bug > Components: Store > Versions: 10.1.1.0 > Environment: With JDK 142 on Windows XP > Reporter: Manjula Kutty > Priority: Minor > > If by mistake you give he location for the db backup as the db itself , then > windows created directories recursively until it crashes! > Repro: > CallableStatement cs = conn.prepareCall("CALL > SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(?, ?)"); > cs.setString(1, "c:/maildb"); > cs.setInt(2, 1); > cs.execute(); > cs.close(); > result: > C:\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\maildb\..................... > Until windows can not show the path!!! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira