|
From: <ls...@us...> - 2007-08-04 10:09:46
|
Revision: 3378
http://jnode.svn.sourceforge.net/jnode/?rev=3378&view=rev
Author: lsantha
Date: 2007-08-04 03:09:43 -0700 (Sat, 04 Aug 2007)
Log Message:
-----------
Fixed the problem with file access rights in cp command.
Modified Paths:
--------------
trunk/fs/src/fs/org/jnode/fs/fat/FatRootEntry.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
trunk/fs/src/fs/org/jnode/fs/jfat/FatEntry.java
trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java
Modified: trunk/fs/src/fs/org/jnode/fs/fat/FatRootEntry.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/fat/FatRootEntry.java 2007-08-04 09:31:03 UTC (rev 3377)
+++ trunk/fs/src/fs/org/jnode/fs/fat/FatRootEntry.java 2007-08-04 10:09:43 UTC (rev 3378)
@@ -115,7 +115,7 @@
* @throws IOException
*/
public FSAccessRights getAccessRights() throws IOException {
- throw new IOException("Not implemented yet");
+ throw new UnsupportedOperationException("not implemented yet");
}
/**
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java 2007-08-04 09:31:03 UTC (rev 3377)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java 2007-08-04 10:09:43 UTC (rev 3378)
@@ -114,7 +114,7 @@
* @see org.jnode.fs.FSEntry#getAccessRights()
*/
public FSAccessRights getAccessRights() throws IOException {
- throw new UnsupportedOperationException("not yet implemented");
+ throw new UnsupportedOperationException("not implemented yet");
}
/**
Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatEntry.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/jfat/FatEntry.java 2007-08-04 09:31:03 UTC (rev 3377)
+++ trunk/fs/src/fs/org/jnode/fs/jfat/FatEntry.java 2007-08-04 10:09:43 UTC (rev 3378)
@@ -210,7 +210,7 @@
* @throws IOException
*/
public FSAccessRights getAccessRights() throws IOException {
- throw new IOException("Not implemented yet");
+ throw new UnsupportedOperationException("not implemented yet");
}
Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2007-08-04 09:31:03 UTC (rev 3377)
+++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2007-08-04 10:09:43 UTC (rev 3378)
@@ -262,7 +262,6 @@
* are relative to the given directory.
*
* @param directory
- * @param filter
*/
public String[] list(String directory) throws IOException {
final FSEntry entry = getEntry(directory);
@@ -291,10 +290,16 @@
{
FSEntry entry = getEntry(path);
if(entry == null)
- {
- throw new FileNotFoundException("file not found: "+path);
- }
- return entry.getAccessRights();
+ throw new FileNotFoundException("file not found: "+path);
+
+ try {
+ return entry.getAccessRights();
+ }catch(UnsupportedOperationException e){
+ //todo review
+ //this feature is not implemented yet in al file system implementations
+ //return null in those cases
+ return null;
+ }
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|