Merge pull request #443 from Geod24/dfix-code
DFix the code
commit bbc72a516421cb3b573c2a9578b9141253e8d3d3
2 parents 1d3f24a + 4a22ed5
@Sönke Ludwig Sönke Ludwig authored on 26 Oct 2014
Showing 5 changed files
View
2
■■■
source/dub/dependency.d
try {
auto strhash = &typeid(string).getHash;
auto str = this.toString();
return strhash(&str);
} catch assert(false);
} catch (Throwable) assert(false);
}
 
bool valid() const {
return m_versA == m_versB // compare not important
View
2
■■■
source/dub/internal/utils.d
import std.random;
auto fname = p ~ format("__dub_write_test_%08X", uniform(0, uint.max));
if (create_if_missing && !exists(p.toNativeString())) mkdirRecurse(p.toNativeString());
try openFile(fname, FileMode.CreateTrunc).close();
catch return false;
catch (Throwable) return false;
remove(fname.toNativeString());
return true;
}
 
View
source/dub/internal/vibecompat/data/json.d
View
source/dub/internal/vibecompat/inet/path.d
View
source/dub/packagemanager.d