Fixed major issues
[ede] / libede / src / FileSystemCache.ec
index 03920bd..89eeaa1 100644 (file)
@@ -132,16 +132,16 @@ public:
                iterateStartPath = true;
 
                // COMPILER TOFIX: this will not compile (error: method class must be derived from class) -- bool Whatever/*FileSystemCache*/::OnFolder(...)
-               bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+               bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path, FileStats stats, bool isRootObject)
                {
                   bool result = true;
                   FileSystemCache cache = this.cache;
-                  uint dev = stats.dev;
-                  uint inode = stats.inode;
+                  //uint dev = stats.dev;
+                  //uint inode = stats.inode;
                   char * p;
                   FSCacheObject parent = isRootObject ? null : cache.normalParentStack.lastIterator.data;
                   FSCacheObject o { parent, name = CopyString(isRootObject ? path : name), stats = stats };
-                  FileStats s;
+                  //FileStats s;
                   if(isRootObject)
                   {
                      // TODO see if we can find a parent for it
@@ -163,20 +163,22 @@ public:
                   }
                   cache.objects.Add(o);
 #if _DEBUG
+                  /*
                   if(cache.objects.count % 1000 == 0)
                      PrintLn(path, " ----- ", cache.objects.count / 1000, " --------- ", dev);
-                  FileGetStatsLink(path, s);
+                  */
+                  //FileGetStatsLink(path, s);
+                  /*
                   if(s.inode != inode)
                   {
                      PrintLn(s.inode);
                      PrintLn(inode);
-                     PrintLn("crap");
                   }
+                  */
                   p = o.GetPath();
                   if(strcmp(p, path))
                   {
                      int c;
-                     PrintLn("damn");
                      PrintLn(p);
                      for(c = 0; c < cache.normalParentStack.count; c++)
                      {
@@ -185,10 +187,10 @@ public:
                         PrintLn(p);
                      }
                      PrintLn(path);
-                     PrintLn("bad");
                   }
                   delete p;
 #endif
+                  /*
                   if(dev && inode && cache.bits.indexInodes)
                   {
                      FileSystemDeviceCache devCache = cache.deviceCaches[dev];
@@ -203,17 +205,18 @@ public:
                         inodes.Add(o);
                      }
                   }
+                  */
                   return result;
                }
 
-               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(char * path)
+               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(const char * path)
                {
                   FileSystemCache cache = this.cache;
                   FSCacheObject o = cache.objects.lastIterator.data;
                   cache.normalParentStack.Add(o);
                }
 
-               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(char * path)
+               void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(const char * path)
                {
                   FileSystemCache cache = this.cache;
                   cache.normalParentStack.lastIterator.Remove();
@@ -310,8 +313,11 @@ public:
    void Special(char * path/*, Map<String, bool> linksPaths*//*Map<uint, Map<uint, bool>> devsInodesDone*/, DummyFileSystemCacheWindow dummyWindow)
    {
       FileSystemCacheIterator fsci { owner = dummyWindow, cache = this, iterateStartPath = true;
-         bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+         bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path,
+            FileStats stats, bool isRootObject)
          {
+                        /*
+
             uint dev = stats.dev;
             uint inode = stats.inode;
             FileSystemCache cache = this.cache;
@@ -353,6 +359,7 @@ public:
             }
             else
                PrintLn("no dev/inode");
+            */
             return true;
          }
       };
@@ -455,12 +462,12 @@ private:
    }
 }
 
-Array<String> GetPathDirNamesArray(char * path)
+Array<String> GetPathDirNamesArray(const char * path)
 {
    Array<String> names;
    if(path && path[0])
    {
-      char * p = path;
+      const char * p = path;
       char rest[MAX_LOCATION];
       char name[MAX_FILENAME];
       names = { };