mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-26 02:03:49 +02:00
Edit saved print names
This commit is contained in:
@@ -575,14 +575,15 @@ namespace VRCX
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<bool> SavePrintToFile(string url, string fileName)
|
||||
public async Task<bool> SavePrintToFile(string url, string path, string fileName)
|
||||
{
|
||||
var path = Path.Combine(GetVRChatPhotosLocation(), fileName);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
if (File.Exists(path))
|
||||
var folder = Path.Combine(GetVRChatPhotosLocation(), "Prints", MakeValidFileName(path));
|
||||
Directory.CreateDirectory(folder);
|
||||
var filePath = Path.Combine(folder, MakeValidFileName(fileName));
|
||||
if (File.Exists(filePath))
|
||||
return false;
|
||||
|
||||
return await ImageCache.SaveImageToFile(url, path);
|
||||
return await ImageCache.SaveImageToFile(url, filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user