mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Moving back to trunk!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ad265b2c54
commit
8d458998a1
332 changed files with 17647 additions and 9466 deletions
|
@ -19,17 +19,13 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Greenshot.Configuration;
|
||||
using Greenshot.Helpers;
|
||||
using Greenshot.Plugin;
|
||||
using GreenshotPlugin.Core;
|
||||
using IniFile;
|
||||
|
||||
namespace Greenshot.Forms {
|
||||
/// <summary>
|
||||
|
@ -168,7 +164,7 @@ namespace Greenshot.Forms {
|
|||
|
||||
private string GetRootDirFromConfig() {
|
||||
string rootDir = conf.OutputFilePath;
|
||||
rootDir = FilenameHelper.FillVariables(rootDir);
|
||||
rootDir = FilenameHelper.FillVariables(rootDir, false);
|
||||
return rootDir;
|
||||
}
|
||||
|
||||
|
@ -178,10 +174,14 @@ namespace Greenshot.Forms {
|
|||
}
|
||||
|
||||
private void CleanUp() {
|
||||
if(eagerlyCreatedDirectory!=null
|
||||
&& eagerlyCreatedDirectory.GetFiles().Length==0
|
||||
&& eagerlyCreatedDirectory.GetDirectories().Length==0) {
|
||||
eagerlyCreatedDirectory.Delete();
|
||||
// fix for bug #3379053
|
||||
try {
|
||||
if(eagerlyCreatedDirectory != null && eagerlyCreatedDirectory.GetFiles().Length == 0 && eagerlyCreatedDirectory.GetDirectories().Length == 0) {
|
||||
eagerlyCreatedDirectory.Delete();
|
||||
eagerlyCreatedDirectory = null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.WarnFormat("Couldn't cleanup directory due to: {0}", e.Message);
|
||||
eagerlyCreatedDirectory = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue