mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
FEATURE-945: Added environment variables to the external command (also removed unused imports and made some variables readonly)
This commit is contained in:
parent
4f326c9c0e
commit
d25021631e
90 changed files with 390 additions and 373 deletions
|
@ -110,12 +110,15 @@ namespace GreenshotPlugin.Core {
|
|||
public static Image GetCachedExeIcon(string path, int index) {
|
||||
string cacheKey = string.Format("{0}:{1}", path, index);
|
||||
Image returnValue;
|
||||
if (!exeIconCache.TryGetValue(cacheKey, out returnValue)) {
|
||||
lock (exeIconCache) {
|
||||
if (!exeIconCache.TryGetValue(cacheKey, out returnValue)) {
|
||||
returnValue = GetExeIcon(path, index);
|
||||
if (returnValue != null) {
|
||||
exeIconCache.Add(cacheKey, returnValue);
|
||||
lock (exeIconCache)
|
||||
{
|
||||
if (!exeIconCache.TryGetValue(cacheKey, out returnValue)) {
|
||||
lock (exeIconCache) {
|
||||
if (!exeIconCache.TryGetValue(cacheKey, out returnValue)) {
|
||||
returnValue = GetExeIcon(path, index);
|
||||
if (returnValue != null) {
|
||||
exeIconCache.Add(cacheKey, returnValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue