mirror of
https://github.com/cyanfish/naps2.git
synced 2024-10-04 19:37:15 +03:00
Expand environment variables in save paths
This commit is contained in:
parent
7d5a3137f9
commit
8c47db7228
@ -39,8 +39,10 @@ namespace NAPS2.ImportExport
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// Start with environment variables
|
||||
string result = Environment.ExpandEnvironmentVariables(fileNameWithPath);
|
||||
// Most placeholders don't need a special case
|
||||
string result = Placeholders.Aggregate(fileNameWithPath, (current, ph) => current.Replace(ph.Key, ph.Value(dateTime)));
|
||||
result = Placeholders.Aggregate(result, (current, ph) => current.Replace(ph.Key, ph.Value(dateTime)));
|
||||
// One does, however
|
||||
var match = NumberPlaceholderPattern.Match(result);
|
||||
if (match.Success)
|
||||
|
Loading…
Reference in New Issue
Block a user