- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/FileCache/SimpleCache.cs
r325 r351 8 8 private readonly Dictionary<string, byte[]> fileCache = new Dictionary<string, byte[]> (); 9 9 10 public override byte[] GetFileContent (string filename) {10 public override byte[] GetFileContent (string _filename) { 11 11 try { 12 12 lock (fileCache) { 13 if (!fileCache.ContainsKey ( filename)) {14 if (!File.Exists ( filename)) {13 if (!fileCache.ContainsKey (_filename)) { 14 if (!File.Exists (_filename)) { 15 15 return null; 16 16 } 17 17 18 fileCache.Add ( filename, File.ReadAllBytes (filename));18 fileCache.Add (_filename, File.ReadAllBytes (_filename)); 19 19 } 20 20 21 return fileCache [ filename];21 return fileCache [_filename]; 22 22 } 23 23 } catch (Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.