[chronojump] More info on Util.FileMove



commit be1b5a43e8c55dc6c3e3c24b860f169d9fe42074
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Sep 13 17:54:18 2019 +0200

    More info on Util.FileMove

 src/util.cs | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index 76988635..d4b6fd3e 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1296,14 +1296,23 @@ public class Util
                return false;
        }
        
-       public static bool FileMove(string path, string filenameOrigin, string filenameDestination) {
+       public static bool FileMove(string path, string filenameOrigin, string filenameDestination)
+       {
+               LogB.Information(string.Format("Going to move: {0} to {1}",
+                                       path + Path.DirectorySeparatorChar + filenameOrigin
+                                       path + Path.DirectorySeparatorChar + filenameDestination
+                                       ));
                try {
                        File.Move(
                                        path + Path.DirectorySeparatorChar + filenameOrigin, 
                                        path + Path.DirectorySeparatorChar + filenameDestination
                                        );
+                       LogB.Information("Moved ok");
                        return true;
-               } catch {}
+               } catch {
+                       LogB.Information("Catched! cannot move");
+               }
+
                return false;
        }
        


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]